Page 1 of 1

Custom Format Exception

Posted: Fri Jun 13, 2008 11:22 am
by jlzhou
I met an exception when I attempt open an Excel created file which has user customized date format stored within the excel file by using both XLSReadWriteII 3/4.

The exception prompt is: "Can not find number format# 57."

I had tried to solve the issue by myself. I found there are only 50 formats have been pre-defined in const array named ExcelStandardNumFormats in "CellFormats4.pas". I added more format strings in the array as below.

Code: Select all


......

{2F} '[h]:mm:ss',
{30} 'mm:ss.0',
{31} '# #0.0E+0',
{32} '@',
{33} '',
{34} '',
{35} '',
{36} '',
{37} '',
{38} '',
{39} '',
{3A} 'yyyy"年"m"月"');   // 3A means format 57

it seems worked but I'm not sure it is right way, please advise. Thank you.

Posted: Fri Jun 13, 2008 11:58 am
by jlzhou
In addition, the excel file is created by Chinese Version Excel 2003.

Please refer the excel file.

http://jlzhou.blogbus.com/files/12133582360.xls

Posted: Mon Jun 23, 2008 2:11 am
by jlzhou
larsa,

Could you please help me?

Posted: Mon Jun 23, 2008 6:49 am
by larsa
Hello

Sorry, but I can't download the file.
Your suggestion to solution is wrong anyway. It will cause errors when reading files.


Lars Arvidsson, Axolot Data

Posted: Mon Jun 23, 2008 9:02 am
by jlzhou
larsa,

Thanks for your reply.

I don't know how to upload file to this forum.

The sample file download address is:

jlzhou.blogbus.com/files/12133582360.xls

Re: Custom Format Exception

Posted: Thu Apr 16, 2009 12:34 pm
by jlzhou
Hi larsa,

Has the issue been fixed officially?

Henry