Search code examples
excelcsvreporting-servicesssrs-2008

SSRS Exporting to CSV format


When I export my information to CSV file so its in raw data format and easily used in one of the fields I have a number that is big (for example, 140313055811). It's really just an invoice number, but when I export it to CSV and open it, it shows something like 1.41E+11. I need to get it to display the full number instead of this. Is there a way? I tried making the textbox that its in as a number, I tried make the value area of the field =int(name of field), I tried changing it to text. None of these do the trick.

The only one that has worked is =FormatNumber(fieldname) and while this did work, it put commas in between as if it were a large number (this is an invoice number). So I was thinking I could use the =Format function but when it asks for "style as string" in the expression what do I put?

I need this report to be automated on the enterprise sharepoint site that's why I am going through great lengths to try to get it to automatically come out right.

Exporting it to excel form makes it hard to use the data, the CSV form is the best way to manipulate the data.

Thanks for any help, I appreciate it


Solution

  • If you check the CSV file in notepad, you might find the value as a scientific number before even making it to the excel.

    You can stick spaces in front and/or behind the value to make the CSV file correct (and treat it as text), but excel will simply make it scientific again anyway the moment its opened and sees numbers.

    The only solution I know of where the export ultimately is used in excel, is to stick a real character into the string like "INV: " before the value and deal with it in the excel file.

    = "INV: " & Fields!invoicenumber.Value    
    

    so it reads "INV: 1230412893481239435" as text.