Open in Excel Numbers to String
dkusleika
Posts: 12 Bronze 3
in SQL Prompt
When I right-click in the grid and choose Open in Excel, numbers are no longer converted to numerics in Excel. Now they are left-justified strings with the little green triangle warning that numbers are strings. This just started happening. I'm not sure exactly when, but I updated SQL Prompt last Friday. I'm running 10.12.3.28623 in SSMS 18.12.1
Tagged:
Best Answer
-
Jon_Kirkwood Posts: 424 Silver 5Just a quick update - this is active in our developers current sprint.
There isn't a confirmed patch release version just yet; but it is underway and look forward to having some more concrete details shortlyJon Kirkwood | Technical Support Engineer | Redgate Software
Answers
Hi @dkusleika
Thank you for reaching out on the Redgate forums regarding this export to Excel problem in SQL Prompt.
I can certainly see there were some changes made in v10.12.3 and sorry if this has caused an issue with your usage of the functionality.
Fixes
Fixed an issue where BIGINT data types were being exported to Excel in scientific notation.
Fixed a performance issue where typing in SSMS was laggy when large snippets are present.
Fixed an issue with an incorrect execution warning when using the ALTER TABLE syntax.
Added support for some SQL Server 2022 syntax, including LEDGER.
Fixed a crash that could occur when running the command line formatter.
Are you able to please provide a screenshot of the output and confirm the data type you are using for the number stored in SQL Server.
This will assist in replicating your issue closely and then provided to our development team to look into a solution.
In the interim I would suggest downgrading to v10.12.2 to see if the output is coming out as expected
https://download.red-gate.com/checkforupdates/SQLPrompt/SQLPrompt_10.12.2.28458.exe
SELECT 1
Shows as numeric in Excel. A larger integer
SELECT 1234
Same. A decimal
SELECT 1.2
Comes in as text (left justified, green triangle in the top left). Maybe the decimal point is triggering something.
Without the decimal, it appears that 10-digit integers come over as numeric and 11 and up come over as text.
I am unable to confirm any resolution timeframe at this point but I would suggest monitoring our release note page for changes in v10.12.4 onwards
https://documentation.red-gate.com/sp/release-notes-and-other-versions/sql-prompt-10-12-release-notes
Unfortunately I have the same issue and now downgraded SQL Prompt. Sounds like someone's forgotten a semicolon
Version 10.12.3.28623 noted that a fix with exporting BIGINT data types was changed with that version. I suspect something done with that had broken the export of decimal and int to be treated as a string in excel.
For those not wanting to downgrade, exporting the results as csv still works, just adds a little more of a hassle.
Thank you to everyone who has advised they are having issues with the output to Excel functionality.
Our development team have confirmed they are working on a few reported problems in this functionality in v10.12.3.
I shall endeavor to update this post when we have a confirmed release that resolves these issues.
Otherwise, please keep an eye out for changes in v10.12.4 and onwards:
https://documentation.red-gate.com/sp/release-notes-and-other-versions/sql-prompt-10-12-release-notes
Was the "Fixed an issue where BIGINT data types were being exported to Excel in scientific notation." a real issue? It seems to me that the scientific notation was only a display issue, for long BIGINT numbers with the default Excel font and cell width. Enlarging the column showed the whole number. This works in 10.12.2.28458
Thank you for your ongoing patience, this is still an open and known issue with SQL Prompt v10.12.3
Our developers are working on a larger release of SQL Prompt which has delayed the resolution of this concern but I have been advised that it is an active item to be resolved.
Workaround continues to be downgrading to v10.12.2 whilst this is being worked on.
Hi all, thank you for the comments & updates on your testing of SQL Prompt patch releases.
I have also reviewed with our developers and the fix included in v10.12.5 was around the usage of a decimal separator. It was defaulting to a US standard and has been changed to match the users current locale
Unfortunately I have to report that our development team have re-reviewed the decimal data type output to Excel concern and, with their current workload and available resources, have made the decision that this is not an item they are able to provide a fix for at this time.
As mentioned by @alphonseg there are workarounds within Excel are to use the Data > Text to Columns ribbon-menu option or right-click > Format Cells... context-menu options to change the formatting on these cells.
Apologies for any inconvenience this may cause with exporting to Excel; and whilst we cannot commit to a fix at this time it is possible that changes may occur in future releases.
It is not a bug in the current release, it was a deliberate change made to be consistent with how it looks within SSMS. As mentioned you can change the field to be a number if that is required by selecting the column and changing the type.
I am disappointed that this isn't a priority to fix a bug that was introduced in the August release. The workaround isn't really feasible for many.
I won't be updating SQL Prompt until I've heard that this has been fixed. There is no feature or change that would make it worth it to do the 'workaround' to export. I love this product, have used it for many years, and have been an avid champion and fan for RedGate to all those I interact with.
I would beg and plea with you to reconsider the priority for addressing fixing this bug that was introduced after 10.12.2.28458. The ability to simply export to excel easily is a critical feature for me.
Please reconsider addressing the issue.
To confirm it isn't a bug in the current version it was a deliberate change to have the information in the excel look as it does within SSMS. If you require them to be numbers they can be multi selected and changed. Would recommend adding your name to the uservoice to change this https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/45753061-restore-the-working-open-in-excel-functionality
I think we all understand that Redgate did this intentionally but making such a change on a minor update seems risky and to many of the users not well documented. I think the change document stated is respected the locale setting for the decimal system. The change actually changed a number field with decimals in the SSMS output into a text field in the Excel output. I can only speak for myself but that isn't this.
From this feedback you can see it's a change most of us didn't ask for, expect or find useful. In fact, this change has made our job harder not easier, which is why we are using SQL prompt.
But regardless if it's a feature or a bug, I don't like it and it will prevent me from upgrading until they add some feature that trumps the loss of this one.