J
Jason Teagle
(Office 2000 & 2003)
A friend of mine pointed out something weird, and I tried it myself because
frankly, I didn't believe him - but he was right.
Start a new sheet, and enter x and y into A1 and B1. Now enter random
numbers into the cells in columns A and B, down to and including row 20. Now
blank out B19.
Save this as CSV, and view the CSV in Notepad. It has all rows of two
columns, and the one we blanked simply ends with a trailing comma,
indicating a missing cell. Perfect.
Now add z to C1. Don't fill anything in that column.
Save as CSV again, and re-examine.
Rows 1 to 16 have a trailing comma, exactly as expected, indicating the
blank cell in the third column. Now look at the last few rows... they don't
have the trailing comma!
Why is this? It stops at row 16 as the Excel sheet sees it.
(Output reproduced below - look at the 31,32 row onwards)
x,y,z
1,2,
3,4,
5,6,
7,8,
9,10,
11,12,
13,14,
15,16,
17,18,
19,20,
21,22,
23,24,
25,26,
27,28,
29,30,
31,32
33,34
35,
37,38
A friend of mine pointed out something weird, and I tried it myself because
frankly, I didn't believe him - but he was right.
Start a new sheet, and enter x and y into A1 and B1. Now enter random
numbers into the cells in columns A and B, down to and including row 20. Now
blank out B19.
Save this as CSV, and view the CSV in Notepad. It has all rows of two
columns, and the one we blanked simply ends with a trailing comma,
indicating a missing cell. Perfect.
Now add z to C1. Don't fill anything in that column.
Save as CSV again, and re-examine.
Rows 1 to 16 have a trailing comma, exactly as expected, indicating the
blank cell in the third column. Now look at the last few rows... they don't
have the trailing comma!
Why is this? It stops at row 16 as the Excel sheet sees it.
(Output reproduced below - look at the 31,32 row onwards)
x,y,z
1,2,
3,4,
5,6,
7,8,
9,10,
11,12,
13,14,
15,16,
17,18,
19,20,
21,22,
23,24,
25,26,
27,28,
29,30,
31,32
33,34
35,
37,38