Leading Zero dropped when exporting

Hello there!
I am exporting a report to excel.
One of the columns is a zip code with a leading zero.
When I export to excel, the leading zero is dropped.
Is there something I can do in LL so leading zero is not dropped.
I know how to fix in excel, but want to do before.
Thanks!

Hi Henry,

IIRC, this is influenced by an export option called XLS.ConvertNumeric or similar. I’m on my smartphone and cannot check. If you grep the programmer’s reference for “ConvertNumeric” you should be able to find it.

G.

Hello there!
Thanks so much for the response! I did check that out.
Is there a way in the project to set it by column?
I set the “Format” property of this column to “None”.

The only way I can get it to work inside the project is to go to that column and put quotes before and after:
‘"’ + CONSUMER.AccessNumber + ‘"’

The only thing with that is the quotes are displayed in excel.

I’d try to set ConvertNumeric to “2” and use Str$(CONSUMNER.AccessNumber,0) for the column.

G.

Thanks so much for the response!
I think I am missing where you set ConvertNumeric to “2”.
Is that something that has to be part of the backend development, or can I go into the project and set that.

I know in the project you can go to menu options Projects/Options and set the precision.
Thank you so much!!

You’re welcome - you need to do that in code, before starting the Print() or Design(). Something along the lines of

LL.ExportOptions.Add(“XLS.ConvertNumeric”, “2”);.

There might also be a suitable enumeration constant for the first parameter.

NB: this is .NET code, for other languages you need an API call (LlXSetParameter, see programmer’s reference for details).

G.

Very good I will check this out!
Thanks!