Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-01-2016, 08:49 AM
ch1325 ch1325 is offline SaveAs FileFormat Windows 7 64bit SaveAs FileFormat Office 2013
Novice
SaveAs FileFormat
 
Join Date: Jun 2015
Location: Montana
Posts: 12
ch1325 is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 04-09-2016, 10:37 AM
BobBridges's Avatar
BobBridges BobBridges is offline SaveAs FileFormat Windows 7 64bit SaveAs FileFormat Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

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?
Reply With Quote
  #3  
Old 04-10-2016, 12:18 AM
macropod's Avatar
macropod macropod is offline SaveAs FileFormat Windows 7 64bit SaveAs FileFormat Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by ch1325 View Post
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.
What code are you using to save the file?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 04-11-2016, 07:23 AM
ch1325 ch1325 is offline SaveAs FileFormat Windows 7 64bit SaveAs FileFormat Office 2013
Novice
SaveAs FileFormat
 
Join Date: Jun 2015
Location: Montana
Posts: 12
ch1325 is on a distinguished road
Default

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.
Reply With Quote
  #5  
Old 04-11-2016, 02:36 PM
macropod's Avatar
macropod macropod is offline SaveAs FileFormat Windows 7 64bit SaveAs FileFormat Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #6  
Old 04-11-2016, 02:53 PM
ch1325 ch1325 is offline SaveAs FileFormat Windows 7 64bit SaveAs FileFormat Office 2013
Novice
SaveAs FileFormat
 
Join Date: Jun 2015
Location: Montana
Posts: 12
ch1325 is on a distinguished road
Default

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.
Reply With Quote
  #7  
Old 04-11-2016, 03:14 PM
macropod's Avatar
macropod macropod is offline SaveAs FileFormat Windows 7 64bit SaveAs FileFormat Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Well, if changing it in Excel corrupts the data, why are you opening it in Excel?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #8  
Old 04-11-2016, 03:24 PM
ch1325 ch1325 is offline SaveAs FileFormat Windows 7 64bit SaveAs FileFormat Office 2013
Novice
SaveAs FileFormat
 
Join Date: Jun 2015
Location: Montana
Posts: 12
ch1325 is on a distinguished road
Default

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.
Reply With Quote
  #9  
Old 04-11-2016, 04:24 PM
macropod's Avatar
macropod macropod is offline SaveAs FileFormat Windows 7 64bit SaveAs FileFormat Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
SaveAs FileFormat VBS saveas API behaviour is different from Menu saveas Ahmed AbuZekry Word VBA 2 03-23-2015 02:14 AM
SaveAs FileFormat 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 FileFormat Saveas error handling jillapass Word VBA 7 03-30-2012 03:24 PM
SaveAs FileFormat saveAs ChDir _ tinfanide Excel Programming 4 11-05-2011 01:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft