#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 921
Default CSV file

Hi,

I was reading a csv file in an excel macro and then creating another csv file.

Here is my problem, I have this big csv file with 200 scenarios, and I
opened the csv file and then deleted 199 scenarios and then resaved the file
with 1 scenario. When I did this the commas changed. So originally the file
had a comma on the last column:

column1 data, col2, col3,

but when it was resaved the last comma was deleted.
column1 data, col2, col3

so in my macro I have it looping through and now it gives an error because I
have to loop using one less column.

Does anyone know how to save the csv file so that the comma at the end is
not deleted? or how to fix this problem.

Thanks for your help
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default CSV file

Maybe you could just add data to the right of that last column.

I'd put a formula like:
=""

It's enough to make excel see that there's something there, but it's unique
enough to remind me why I did it.

Jeff wrote:

Hi,

I was reading a csv file in an excel macro and then creating another csv file.

Here is my problem, I have this big csv file with 200 scenarios, and I
opened the csv file and then deleted 199 scenarios and then resaved the file
with 1 scenario. When I did this the commas changed. So originally the file
had a comma on the last column:

column1 data, col2, col3,

but when it was resaved the last comma was deleted.
column1 data, col2, col3

so in my macro I have it looping through and now it gives an error because I
have to loop using one less column.

Does anyone know how to save the csv file so that the comma at the end is
not deleted? or how to fix this problem.

Thanks for your help


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I email amacro? leo Excel Worksheet Functions 24 August 9th 06 02:47 PM
Copying & Filling in data from One file into another. Sreeraman.TS Excel Worksheet Functions 0 June 19th 06 01:19 PM
file will not open txskyhawk Excel Discussion (Misc queries) 4 April 19th 06 12:35 AM
Pasword protected Excel file encrypted, how do I read this file? jonesteam Excel Discussion (Misc queries) 2 December 12th 05 06:32 PM
Links picking up values from an older version of linked file Cate Links and Linking in Excel 4 October 20th 05 01:53 PM


All times are GMT +1. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"