#1
|
|||
|
|||
SaveAs FileFormat
Hi,
I have this annoying issue where UTF8 CSV files always try to save in Unicode text format, I can't find anything to get past this. So I was wondering if I could use a macro for when my users save the file that it automatically saves it as a .CSV, is this possible? Thank you for your time. |
#2
|
||||
|
||||
I'm missing something important, here. You want to save it as a CSV instead of in Unicode text format? Isn't that like saying you want your new car to be a Chevy instead of blue?
I had the impression that Unicode is a character coding, and CSV a file format. Am I mistaken? |
#3
|
||||
|
||||
What code are you using to save the file?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
Hi,
Thanks for the replies, So far the users are just instructed to use Save As to change the file format to .CSV. This is because our mail manager software does not read anything other than CSV to convert to .DBF. Not to mention we have this bug which development refuses to fix that if you save in unicode .TXT it corrupts the data. Their work-around is to just use Save As. Great workaround, only problem is that users forget so I'd rather have a macro to auto-save this to .CSV everytime. Using advanced options in excel does not work unfortunately. |
#5
|
||||
|
||||
You refer to the files as 'UTF8 CSV files'. Since you're apparently opening CSV files, you'd be prompted to save any changes upon existing and the default format would again be CSV. I'm not sure what you're trying to change. If your mail manager software is looking for CSV files, it shouldn't be processing TXT files anyway.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
Yes what I mean is that the file is encoded in UTF-8 however, the file that the software exports it as is just simply saving the file with a .csv extension. So you are technically opening a file with .csv at the end that is encoded in UTF-8.
Our Mail Manager software only reads .csv format and if you change it within excel it corrupts the data. So hence I am looking for a way where it auto-sets the file format to CSV when saving and not automatically setting the file format to Unicode Text everytime we try saving the file. Like I said its a bug I am trying to workaround since the developers refuse to fix it. |
#7
|
||||
|
||||
Well, if changing it in Excel corrupts the data, why are you opening it in Excel?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
it doesn't matter what you use, it corrupts it even if you change it in notepad, which is strange.
We do have a workaround though, if you save it as a .CSV then close it, then open it again, make changes, then save as a .CSV once more, the problem is solved. The only issue we have is that of course, they forget. |
#9
|
||||
|
||||
That suggests the problem is as much as anything to do with the file contents, not the format. What you seem to need is something that ensure the files are opened, saved, closed & re-opened before any editing is done. That may not be not something that could be automated and, if it could, would affect the opening process for every Excel file, regardless of the format.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBS saveas API behaviour is different from Menu saveas | Ahmed AbuZekry | Word VBA | 2 | 03-23-2015 02:14 AM |
How to suppress saveas dialog from VB6 | steveneashcraft | Word VBA | 15 | 05-09-2014 07:01 AM |
Excel 2010 Not Recognizing Some FileFormat Values | CGM3 | Excel Programming | 4 | 03-24-2013 11:55 AM |
Saveas error handling | jillapass | Word VBA | 7 | 03-30-2012 03:24 PM |
saveAs ChDir _ | tinfanide | Excel Programming | 4 | 11-05-2011 01:40 AM |