Page 1 of 2

DC_Workarea2excel number format

Posted: Sat Jul 20, 2019 1:57 am
by Victorio
Hi,
I have some problem with export data to excel.
When exporting number field with decimals, program error:

Error Automation/6500;Description : Nie je možné nastaviť vlastnosť NumberFormat triedy Range;Operation : NumberFormat;Thread ID : 1

(Cannot set Number Format...)

Solution is only export number as text but with this is problem when user want work with excel table, counting columns etc.

Any help ?
THX

Re: DC_Workarea2excel number format

Posted: Sun Jul 21, 2019 3:01 am
by Eugene Lutsenko
I also had something like this and I asked about it on the forum

Re: DC_Workarea2excel number format

Posted: Sun Jul 21, 2019 6:33 am
by Victorio
Eugene, I looked for your message, but found you some solution ?
This is not very important, can use text field, only user can not direct use Sum function, need convert column to number.
I mait this have something with send data to excel sheet, I must study how can set decimals in Excel table.

I found modified version of DC_Workarea2excel here :
http://bb.donnay-software.com/donnay/vi ... area2excel

I must examine it ...

Re: DC_Workarea2excel number format

Posted: Sun Jul 21, 2019 8:52 am
by rdonnay
Can you give me a sample program that causes this error?

Re: DC_Workarea2excel number format

Posted: Mon Jul 22, 2019 12:32 am
by Victorio
Roger, example is in attached file.
I looked for problem, it is something around this :

IF !Empty(cFormat)
oSheet:Columns(i):NumberFormat := cFormat
ENDIF

but I do not exclude that can be some problem with Office or excel setting. I am using Office 365.

Re: DC_Workarea2excel number format

Posted: Mon Jul 22, 2019 6:29 am
by rdonnay
Everything seems to work ok for me.

It is possible that you do not have the most current version of DC_WorkArea2Excel().

The file _DCFUNCT.PRG is attached.

Copy it to your \exp20\source\dclipx folder and run BUILD20.BAT to rebuild DCLIPX.DLL.

Re: DC_Workarea2excel number format

Posted: Mon Jul 22, 2019 6:43 am
by Victorio
Thank you , I will try it and write how it works.
Viktor

Re: DC_Workarea2excel number format

Posted: Mon Jul 22, 2019 8:37 am
by hz_scotty
with the new _dcfunct.prg there is a unresolved external symbol DC_GETSQLSTATMENT
by rebuild.

:think:

Re: DC_Workarea2excel number format

Posted: Mon Jul 22, 2019 8:52 am
by hz_scotty
DC_SQLSTATEMENT Line 3248 :whistle:

Re: DC_Workarea2excel number format

Posted: Mon Jul 22, 2019 11:06 am
by rdonnay
Sorry. There is a lot of new stuff coming up in eXpress++ build 267.

It looks like you need _DCSQL.PRG.