A
Andrew Bunner
I have an application that writes a .SLK file for consumption by Excel.
It "works" in that Excel can open the SLK file and the
formatting/values are preserved. But Excel reports a whole series of
errors like "Cannot read record <number>".
If I click "No" when Excel asks "Continue reporting each error", the
file appears correctly. But the file is going to be automatically
produced and then consumed by a client--I don't want to ask my client
to "just ignore those errors". I'd rather find a way to produce a SLK
file that didn't cause Excel to report any errors!
I found one thread that talks about the locality making a difference,
but the author didn't say how to fix it.
Here's the first part of my SLK file. Any help would be great!
p.s. We chose SLK format because it has broad support on older versions
of Excel which is important for our clients.
ID;PWXL;N;E
P;PGeneral
P;P0
P;P0.00
P;P#,##0
P;P#,##0.00
P;P#,##0_);;\(#,##0\)
P;P#,##0_);;[Red]\(#,##0\)
P;P#,##0.00_);;\(#,##0.00\)
P;P#,##0.00_);;[Red]\(#,##0.00\)
P;P"$"#,##0_);;\("$"#,##0\)
P;P"$"#,##0_);;[Red]\("$"#,##0\)
P;P"$"#,##0.00_);;\("$"#,##0.00\)
P;P"$"#,##0.00_);;[Red]\("$"#,##0.00\)
P;P0%
P;P0.00%
P;P0.00E+00
P;P##0.0E+0
P;P#\ ?/?
P;P#\ ??/??
P;Pm/d/yyyy
P;Pd\-mmm\-yy
P;Pd\-mmm
P;Pmmm\-yy
P;Ph:mm\ AM/PM
P;Ph:mm:ss\ AM/PM
P;Ph:mm
P;Ph:mm:ss
P;Pm/d/yyyy\ h:mm
P;Pmm:ss
P;Pmm:ss.0
P;P@
P;P[h]:mm:ss
P;P_("$"* #,##0_);;_("$"* \(#,##0\);;_("$"* "-"_);;_(@_)
P;P_(* #,##0_);;_(* \(#,##0\);;_(* "-"_);;_(@_)
F;P30;FG0G;C1
F;P30;FG0G;C2
F;P30;FG0G;C3
F;P30;FG0G;C4
F;P30;FG0G;C5
F;P30;FG0G;C6
F;P30;FG0G;C7
F;P30;FG0G;C8
F;P30;FG0G;C9
F;P30;FG0G;C10
F;P30;FG0G;C11
F;P30;FG0G;C12
F;P30;FG0G;C13
F;P30;FG0G;C14
F;P30;FG0G;C15
C;Y1;X1;N;K"Col1"
C;X2;N;K"Col2"
C;X3;N;K"Col3"
C;X4;N;K"Col4"
C;X5;N;K"Col5"
C;X6;N;K"Col6"
C;X7;N;K"Col7"
C;X8;N;K"Col8"
C;X9;N;K"Col9"
C;X10;N;K"Col10"
C;X11;N;K"Col11"
C;X12;N;K"Col12"
C;X13;N;K"Col13"
C;X14;N;K"Col14"
C;X15;N;K"Col15"
C;X16;N;K"Col16"
F;P30;FG0G;Y2;X1
C;Y2;X1;N;K"123469798903"
C;Y2;X2;N;K"10.00"
C;Y2;X3;N;K"240"
C;Y2;X4;N;K"$10.00"
C;Y2;X5;N;K"53"
C;Y2;X6;N;K"(e-mail address removed)"
C;Y2;X7;N;K"Generic"
C;Y2;X8;N;K""
C;Y2;X9;N;K"Shopper"
C;Y2;X10;N;K"100 Main St"
C;Y2;X11;N;K""
C;Y2;X12;N;K"Belmont"
C;Y2;X13;N;K"CA"
C;Y2;X14;N;K"94002"
C;Y2;X15;N;K"9999999999"
C;Y2;X16;N;K"1416345"
F;P30;FG0G;Y3;X1
It "works" in that Excel can open the SLK file and the
formatting/values are preserved. But Excel reports a whole series of
errors like "Cannot read record <number>".
If I click "No" when Excel asks "Continue reporting each error", the
file appears correctly. But the file is going to be automatically
produced and then consumed by a client--I don't want to ask my client
to "just ignore those errors". I'd rather find a way to produce a SLK
file that didn't cause Excel to report any errors!
I found one thread that talks about the locality making a difference,
but the author didn't say how to fix it.
Here's the first part of my SLK file. Any help would be great!
p.s. We chose SLK format because it has broad support on older versions
of Excel which is important for our clients.
ID;PWXL;N;E
P;PGeneral
P;P0
P;P0.00
P;P#,##0
P;P#,##0.00
P;P#,##0_);;\(#,##0\)
P;P#,##0_);;[Red]\(#,##0\)
P;P#,##0.00_);;\(#,##0.00\)
P;P#,##0.00_);;[Red]\(#,##0.00\)
P;P"$"#,##0_);;\("$"#,##0\)
P;P"$"#,##0_);;[Red]\("$"#,##0\)
P;P"$"#,##0.00_);;\("$"#,##0.00\)
P;P"$"#,##0.00_);;[Red]\("$"#,##0.00\)
P;P0%
P;P0.00%
P;P0.00E+00
P;P##0.0E+0
P;P#\ ?/?
P;P#\ ??/??
P;Pm/d/yyyy
P;Pd\-mmm\-yy
P;Pd\-mmm
P;Pmmm\-yy
P;Ph:mm\ AM/PM
P;Ph:mm:ss\ AM/PM
P;Ph:mm
P;Ph:mm:ss
P;Pm/d/yyyy\ h:mm
P;Pmm:ss
P;Pmm:ss.0
P;P@
P;P[h]:mm:ss
P;P_("$"* #,##0_);;_("$"* \(#,##0\);;_("$"* "-"_);;_(@_)
P;P_(* #,##0_);;_(* \(#,##0\);;_(* "-"_);;_(@_)
F;P30;FG0G;C1
F;P30;FG0G;C2
F;P30;FG0G;C3
F;P30;FG0G;C4
F;P30;FG0G;C5
F;P30;FG0G;C6
F;P30;FG0G;C7
F;P30;FG0G;C8
F;P30;FG0G;C9
F;P30;FG0G;C10
F;P30;FG0G;C11
F;P30;FG0G;C12
F;P30;FG0G;C13
F;P30;FG0G;C14
F;P30;FG0G;C15
C;Y1;X1;N;K"Col1"
C;X2;N;K"Col2"
C;X3;N;K"Col3"
C;X4;N;K"Col4"
C;X5;N;K"Col5"
C;X6;N;K"Col6"
C;X7;N;K"Col7"
C;X8;N;K"Col8"
C;X9;N;K"Col9"
C;X10;N;K"Col10"
C;X11;N;K"Col11"
C;X12;N;K"Col12"
C;X13;N;K"Col13"
C;X14;N;K"Col14"
C;X15;N;K"Col15"
C;X16;N;K"Col16"
F;P30;FG0G;Y2;X1
C;Y2;X1;N;K"123469798903"
C;Y2;X2;N;K"10.00"
C;Y2;X3;N;K"240"
C;Y2;X4;N;K"$10.00"
C;Y2;X5;N;K"53"
C;Y2;X6;N;K"(e-mail address removed)"
C;Y2;X7;N;K"Generic"
C;Y2;X8;N;K""
C;Y2;X9;N;K"Shopper"
C;Y2;X10;N;K"100 Main St"
C;Y2;X11;N;K""
C;Y2;X12;N;K"Belmont"
C;Y2;X13;N;K"CA"
C;Y2;X14;N;K"94002"
C;Y2;X15;N;K"9999999999"
C;Y2;X16;N;K"1416345"
F;P30;FG0G;Y3;X1