Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with empty values in generated Excel. #1544

Open
bjornsegrell opened this issue Dec 5, 2023 · 1 comment
Open

Issue with empty values in generated Excel. #1544

bjornsegrell opened this issue Dec 5, 2023 · 1 comment

Comments

@bjornsegrell
Copy link

I'm importing tab separated data via Import-Excel and piping it to Export-Excel. The created Excel file is then imported to Sql Server via OpenRowset.
The problem is that the "empty" cells don't import in as NULL values, but rather as some sort of empty string.

If I open the same tab separated file with Excel and save as .xlsx it will import as NULL.

I guess it's technically not wrong for it to be "empty" strings. But kind of unexpected.

I have the same issue if I do "Invoke-Sqlcmd -OutputAs DataRows | Export-Excel" and try to import the thusly generated Excel

Any suggestion to on how to get around this?

@scriptingstudio
Copy link

Empty values will be converted to NULL after rendering by Excel app because Export-Excel generates just a declaration of xlsx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants