Apr 02 2024 06:23 AM - edited Apr 02 2024 08:00 AM
hi, i copied the result set of an account receivable "aging" query run in ssms over to excel. Column heading might be something like Current, [1-10] ,[11-30],[31-60]...[>=181] representing the $'s owed by customers slotted into how long overdue they are. Every heading except [1-10] and [11-30] were fine. These 2 converted to nonsensical dates upon paste to excel. I poked around looking for a way to rename them and got into some sort of wild goose chase where excel already thought they had names starting with an underscore that i wasnt allowed to change. Can somebody help? I really like this look for headings. I tried putting blanks before and after the dashes to no avail.
Apr 03 2024 02:06 AM
It sounds like Excel is automatically interpreting the headings [1-10] and [11-30] as dates due to their format. To prevent Excel from converting them to dates, you can precede the headings with an apostrophe ', which tells Excel to treat the content as text.
Here's what you can do:
By preceding the headings with an apostrophe, Excel will recognize them as text and won't attempt to convert them to dates. This should resolve the issue of nonsensical dates appearing in your column headings.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and like it!
This will help all forum participants.
Apr 03 2024 09:55 AM
Not sure how query is run in SSMS, but why don't you use Power Query to import data from SQL server?