1
Good afternoon.
I need to generate an excel file by SQL SERVER. And I need to specify the data type of the cells in that file.
For example, in the value cells, set the data type to "R$" for example. In a cell with a percentage, already set the cell data type to "%".
In C# this is done with ease, but it is possible to do this in SQL SERVER?
I have the CUSTOMER table with the following extrusion:
NOME DATANASCIMENTO VALOR
Thiago Henrique 18-09-1988 52.50
Pedro Diniz 18-09-1988 12.67
I need to generate an excel file that exports this data where in the worksheet the column NOME
has the data type with "Text", the column DATANASCIMENTO
has the data type "Abbreviated Date" and the column VALOR
has the die type "Currency"
Personal thank you.
Hello Thiago, your question is a little wide. It would be easier to get an answer if you explained better what you really need. For example, are you already exporting the data to Excel? Already have the query? Already have the conversion formula? This and other information is needed to get a good answer. If possible, add some example of what you really need.
– Randrade
@Randrade What I need is to generate an excel with the result of a query. I have no conversion formula. I will add the example.
– Thiago Henrique
In this case you have two questions. One of how to export and the other of how to "customize" the returned values. I suggest you open two questions, as they are two separate subjects.
– Randrade