Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

diffrences between a csv file in 2003 and 2007

Status
Not open for further replies.

jackmaster

Technical User
Dec 15, 2011
15
GB
i am using a csv file to create a tool catalogue in Catia V5 and it worked perfectly using a csv file from office 2003 now using 2007 it doesnt work and the file size is almost 4 times the size of the 2003 csv file, when i open the csv file using wordpad the 2007 version has multiple commas after each line and these are not there in the 2003 version.

Cheers Jackmaster
 



hi,

What APPLICATION do you use to create the .csv file?

What METHOD do you use to create the .csv file?

Please be as specific as possible.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
sorry about that Skip,i am new to forums. i am using excel to create the csv and i have tried all the options available ie (msdos) (mac) etc but the file size is still large and the commas are still there.

jackmaster
 

csv file is just that - Comma Separated Value file. It is just a text file.
"using a csv file from office 2003 now using 2007" - are you talking Excel 2003 vs 2007? If so, HOW are you creating the cvs file? What steps? And are you selecting any empty columns/cells from Excel to save as csv file?

Have fun.

---- Andy
 
Hi Andy,

I just select the page in excel and hit file save as 'csv' but for some reason there is a difference between 2003 and 2007.

Cheers

Jonnie
 


It seems that you DO have data in the extra columns.

In your Excel sheet, select ALL the COLUMNS to the right of your table and then RIGHT-CLICK -- DELETE.

Now SaveAs .csv

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hi Andy,

It is not possible to delete the columns as there are many and they all vary in size, i have attached the xls file (i think) to show you.

Jonnie
 


You are linking to your C DRIVE, which is NOT accessable to anyone!!!

Furthermore, many of us cannot download such files due to company restrictions.
It is not possible to delete the columns as there are many and they all vary in size...
That does NOT make any sense at all! First, the COLUMNS do not get deleted. The DATA in the columns is deleted! You appear to have unwanted data in these EXTRA columns-- HENCE the [highlight],,,,,,[/highlight] result in your .csv file.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Sorry Skip but as i said earlier i am new to forums.

i have tried to select the columns on the first few rows and r/h click select delete and save this as csv, once i open with wordpad the commas are still present, i know it doesnt make sense but this is what is happening.

Jonnie
 

What I would try is:
1. Make a copy of your Excel file
2. Open the copy, find the data you want to keep
3. Delete everything else (columns with data, rows with data, etc)
4. Keep only the data you want to have in CSV
5. Save it as csv file
6. Open csv file in Notepad and check if that's what you need.

I know it is a little 'over-kill', but that would be my starting point.

Have fun.

---- Andy
 


i have tried to select the columns [highlight]on the first few rows [/highlight]
[highlight]This[/highlight] tells me that you are NOT selecting COLUMNS. Rather, you are selecting CELLS.

Do you see, A B C D etc as the COLUMN IDs? THAT is where to select to select the ENTIRE COLUMN, not just a handfull of cells!

If, for instance, you have data in columns A-F, then you would select on G, with the [SHIFT] key depresses and then hit [END] then [RIGHT ARROW]. You should have COLUMNS G thru XFD selected

Now, with the appropriate columns selected, Right-click DELETE.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
i need the all the data in the sheet, it appears the empty cells are being filled with a comma and this is causing me problems, i cannot just remove all commas as some are needed in certain places.

Jonnie
 

What would you expect to have in your csv file if your data looks like:
[tt]
A B C D E
123 ABCD <empty> <empty> ABC123
[/tt]
???

Have fun.

---- Andy
 



Have at it Andy! I give up!

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Finally skip i get what you mean (i am not dumb, honestly) this does work to some degree but because the data varies in column width it will makes things long winded to remove the empty spaces on each line.

i am signing off now so may not reply until tomorrow.

Jonnie
 


it will makes things long winded to remove the empty spaces on each line.
My process takes A FEW SECONDS (SIX KEY STROKES/MOUSE CLICKS)!!!

Your output is the result of a table of data. A table is a bounded number of rwos and columns.

My suggestion addresses the area (columns) OUTSIDE AND TO THE RIGHT OF the table of data that you want to export as .csv, that is resulting in EXTRA COMMAS -- I assume that means MORE commans than there are columns in your table of data.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 

It is not that easy to give it up, Skip. Is it? :)

It would be nice to know - in a small example of data presented here - what jackmaster has in it, what he gets in csv file and what he would like to get. And point the differences.

Have fun.

---- Andy
 


I really want users to understand the principles.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I will try to explain more clearly.

The excel sheet has 670 rows
1 to 59 have data in columns A,B.
60 to 117 have data in columns A-AI
118 to 252 have data in coulmns A-AG
and so on, so i cannot just select the columns as Skip suggested and then delete the empty data from the cells, what i did try was to select C1:C59 hold down shift , select end and then hit the r/h arrow key and then delete these cells and this did make a difference to the output size of the csv file but when i edit using wordpad some of the commas are still there (see below) and the script i am using will not run.

I hope this helps.



*************2003************************
CHAPTER,NC_RESOURCES
Keywords,Name
Types,String
NC_TOOLS,NC_TOOLS
NC_INSERTS,NC_INSERTS
NC_TOOL_ASSEMBLIES,NC_TOOL_ASSEMBLIES
NC_CORRECTORS,NC_CORRECTORS
END,

***********2007*********************
CHAPTER,NC_RESOURCES,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Keywords,Name,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Types,String,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
NC_TOOLS,NC_TOOLS,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
NC_INSERTS,NC_INSERTS,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
NC_TOOL_ASSEMBLIES,NC_TOOL_ASSEMBLIES,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
NC_CORRECTORS,NC_CORRECTORS,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
END,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
 


I do not believe that your Excel 2003 example reflects the statement regarding the rows and columns of data.

Copy this and paste it into an empty sheet and use Data > Text to columns -- DELIMITED to parse using a COMMA...
[tt]
CHAPTER,NC_RESOURCES,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,[highlight]END[/highlight],
Keywords,Name,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Types,String,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
NC_TOOLS,NC_TOOLS,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
NC_INSERTS,NC_INSERTS,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
NC_TOOL_ASSEMBLIES,NC_TOOL_ASSEMBLIES,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
NC_CORRECTORS,NC_CORRECTORS,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
END,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
[/tt]
THIS will result in a table from [highlight]A:AI[/highlight].
The excel sheet has 670 rows
1 to 59 have data in columns A,B.
60 to 117 have data in columns [highlight]A-AI[/highlight]
118 to 252 have data in coulmns A-AG
Bottom line: your export table to the .csv file is A:AI!!!! Pure and simple. The COMMAS are part of the entire deal and SHOULD be there!!!

You have not told the entire story regarding the 2003 generated .csv, because the SAME THING SHOULD HAPPEN!

I suspect that you may also have DATA in column AJ, in the "and so on".

Explain why you have these divisions as stated...
[tt]
to 59 have data in columns A,B.
60 to 117 have data in columns A-AI
118 to 252 have data in coulmns A-AG
and so on,
[/tt]


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top