Custom Format Exception

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
jlzhou
Posts: 5
Joined: Tue Feb 19, 2008 5:05 am

Custom Format Exception

Post 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.
jlzhou
Posts: 5
Joined: Tue Feb 19, 2008 5:05 am

Post 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
jlzhou
Posts: 5
Joined: Tue Feb 19, 2008 5:05 am

Post by jlzhou »

larsa,

Could you please help me?
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Post 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
jlzhou
Posts: 5
Joined: Tue Feb 19, 2008 5:05 am

Post 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
jlzhou
Posts: 5
Joined: Tue Feb 19, 2008 5:05 am

Re: Custom Format Exception

Post by jlzhou »

Hi larsa,

Has the issue been fixed officially?

Henry
Post Reply