Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default SaveAs Filename:=filename, FileFormat:=xlCSV

Hi

There is aparently a bug in excel


When I save my workbook with the code
SaveAs Filename:=filename, FileFormat:=xlCSV
I get too many separators!
The first rows is with wrong number of fields

The parameter local is not involved - tried to set it but no result.

There are emty cells from C1 (col 3) to IV1 (col 255)
There are emty cells from H1 (col 8) to IV2 (col 255)
and so on

But not on all rows as you see..
Is there a way out of this?

*BOF*
field1;field2;;;;;
field1;field2;field3;field4;field5;field6;field7
field1;field2;field3;field4;field5;field6;field7
field1;field2;field3;field4;field5;field6;
field1;field2;;;;;
field1;;;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3
field1;field2;field3
field1;field2;field3
field1;field2;field3
field1;field2;field3
field1;field2;field3
field1;;
*EOF*


Best regards Ted

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default SaveAs Filename:=filename, FileFormat:=xlCSV

Saved from a previous post:

This might describe the problem of too many commas in CSV files:

http://support.microsoft.com/default.aspx?scid=77295
Column Delimiters Missing in Spreadsheet Saved as Text

(It actually describes missing delimiter, but if some are "missing", maybe the
ones appearing are "extra".)

(But a lot of programs (excel included) don't care about those extra columns.
Maybe you don't have to care, either???)

Maybe you could write your own exporting program that would behave exactly the
way you want:

Here are three sites that you could steal some code from:

Earl Kiosterud's Text Write program:
www.smokeylake.com/excel
(or directly: http://www.smokeylake.com/excel/text_write_program.htm)

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

(or maybe you could build your own formula and copy|paste into Notepad.)

Teddy wrote:

Hi

There is aparently a bug in excel

When I save my workbook with the code
SaveAs Filename:=filename, FileFormat:=xlCSV
I get too many separators!
The first rows is with wrong number of fields

The parameter local is not involved - tried to set it but no result.

There are emty cells from C1 (col 3) to IV1 (col 255)
There are emty cells from H1 (col 8) to IV2 (col 255)
and so on

But not on all rows as you see..
Is there a way out of this?

*BOF*
field1;field2;;;;;
field1;field2;field3;field4;field5;field6;field7
field1;field2;field3;field4;field5;field6;field7
field1;field2;field3;field4;field5;field6;
field1;field2;;;;;
field1;;;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3
field1;field2;field3
field1;field2;field3
field1;field2;field3
field1;field2;field3
field1;field2;field3
field1;;
*EOF*

Best regards Ted


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default SaveAs Filename:=filename, FileFormat:=xlCSV

Hi Dave

:-) Great. Thanks a lot!

Best regards Ted


On 29 Maj, 15:05, Dave Peterson wrote:
Saved from a previous post:

This might describe the problem of too many commas in CSV files:

http://support.microsoft.com/default.aspx?scid=77295
Column Delimiters Missing in Spreadsheet Saved as Text

(It actually describes missing delimiter, but if some are "missing", maybe the
ones appearing are "extra".)

(But a lot of programs (excel included) don't care about those extra columns.
Maybe you don't have to care, either???)

Maybe you could write your own exporting program that would behave exactly the
way you want:

Here are three sites that you could steal some code from:

Earl Kiosterud's Text Write program:www.smokeylake.com/excel
(or directly: http://www.smokeylake.com/excel/text_write_program.htm)

Chip Pearson's:http://www.cpearson.com/excel/imptext.htm

J.E. McGimpsey's:http://www.mcgimpsey.com/excel/textfiles.html

(or maybe you could build your own formula and copy|paste into Notepad.)





Teddy wrote:

Hi


There is aparently a bug in excel


When I save my workbook with the code
SaveAs Filename:=filename, FileFormat:=xlCSV
I get too many separators!
The first rows is with wrong number of fields


The parameter local is not involved - tried to set it but no result.


There are emty cells from C1 (col 3) to IV1 (col 255)
There are emty cells from H1 (col 8) to IV2 (col 255)
and so on


But not on all rows as you see..
Is there a way out of this?


*BOF*
field1;field2;;;;;
field1;field2;field3;field4;field5;field6;field7
field1;field2;field3;field4;field5;field6;field7
field1;field2;field3;field4;field5;field6;
field1;field2;;;;;
field1;;;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3;;;;
field1;field2;field3
field1;field2;field3
field1;field2;field3
field1;field2;field3
field1;field2;field3
field1;field2;field3
field1;;
*EOF*


Best regards Ted


--

Dave Peterson- Skjul tekst i anførselstegn -

- Vis tekst i anførselstegn -



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
SaveAs Filename and FileFormat in Vs2007 RobN[_2_] Excel Discussion (Misc queries) 4 July 14th 07 01:21 AM
SaveAs filename PDF kidkarma Excel Programming 2 March 8th 07 09:25 AM
FileFormat:=xlCSV for a cell with =TODAY() gives unwantedamerican Crewman Excel Programming 4 March 5th 05 07:18 PM
FileName SaveAs alanford Excel Programming 1 February 18th 05 02:01 PM
SaveAs Filename Help Ed[_14_] Excel Programming 2 November 20th 03 08:43 PM


All times are GMT +1. The time now is 06:21 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"