October 5, 2021 at 5:38 pm
Hi,
Having an issue where the default column format is General for downloading to Excel, but was hoping I could change it to Text so I can download and send without touching the spreadsheet. Is there some rendering code I could add to download type?
Thanks
October 6, 2021 at 6:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
October 8, 2021 at 2:03 pm
I'm interested also if this is possible. I believe not because SSRS is rendering it as Excel.
October 8, 2021 at 3:05 pm
Hi Joe,
I found the downloaded excel file was in "General" format.
I needed to submit this file for processing thru an SFTP site, and wouldn't accept it as "General" and needed to be in "TEXT"
I ended up using a VBA script that I run just prior to submitting it, the .Parent.NumberFormat = "@" changes it to TEXT
Set xlObj = CreateObject("Excel.Application")
'Set xlFile = xlObj.Workbooks.Open("c:\temp\filename.xlsx")
'turn off screen alerts
xlObj.Application.DisplayAlerts = False
'loop through sheets
For Each Worksheet In xlFile.Worksheets
'change all sheets to desired font
With Worksheet.Cells.Font
.Name = "Verdana"
.Size = 12
.Parent.NumberFormat = "@"
End With
Next
'save, close, then quit
xlFile.Close True
xlObj.Quit
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply