696
Views
2
Comments
Exporting to excel and specifying number format in the file
Question

Hi There, 

I am new to Outsystems and I would like to designate the excel number format of the data I am writing to an excel file. 

For example, if I write the following date: "2018-02-08" to an excel file from a database, it is designated as a "custom" datatype in excel (as shown in the image below):


However, I would like to be able to designate it to short date format: 

"2018/02/08". I would like to be able to change the formats of more than just the date, but I figure solving this question would help me in general. For example, I would also like to stipulate (automatically in excel) that some values are currency values.  

Any assistance would be greatly appreciated. 

Regards, 

Cole






2018-06-07 09-54-29
Renato Torres

Hi Cole,


The out-of-the-box RecordListToExcel server action does not support cell formatting.


There is a forge component name Excel Package with additional capabilities but I think it is only possible to do style formatting (like colors, bold, etc.). Nevertheless, this component is based on a open source library that seems to support formatting (for example, check this StackOverflow post) - it should be possible to extend it to achieve what you need with some additional C# coding.


Cheers,

Renato


Cole Noble wrote:

Hi There, 

I am new to Outsystems and I would like to designate the excel number format of the data I am writing to an excel file. 

For example, if I write the following date: "2018-02-08" to an excel file from a database, it is designated as a "custom" datatype in excel (as shown in the image below):


However, I would like to be able to designate it to short date format: 

"2018/02/08". I would like to be able to change the formats of more than just the date, but I figure solving this question would help me in general. For example, I would also like to stipulate (automatically in excel) that some values are currency values.  

Any assistance would be greatly appreciated. 

Regards, 

Cole








UserImage.jpg
Cole Noble

Thanks so much for your response Renato. 

Indeed, I did see that package but, like you say, it seems to only support specific formatting. 

I just wanted to be sure that I wasn't missing anything obvious. 

I will look into said modifications if I deem the change absolutely necessary. 


Cheers, 

Cole

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.