Open darrylthom opened 1 day ago
Maybe in excel the underling value is still "001000" but excel decides to logically present it as 1000? I'm not sure.
I'll take a look in the options on what's possible here.
Do you have an example parquet file that I can test this on?
Do you mean that text is wrapped like the following?
In this example I manually set wrap text to a cell. Initially it wasn't wrapped.
Do you mean that text is wrapped like the following?
In this example I manually set wrap text to a cell. Initially it wasn't wrapped.
When I use Copy Page and paste directly into Excel, all of my cells pasted in have Wrap Text selected in the Home tab and the first row has Bold text. Also, the alignment is getting set as well but that might have to do with Excel's detected "type".
I've fixed the header being bold. I'm not sure if I've fixed the wrap text thing, as it didn't occur to me in google sheets (I don't have excel).
https://github.com/luusluus/vscode-parquet-visualizer/pull/90
Maybe in excel the underling value is still "001000" but excel decides to logically present it as 1000? I'm not sure.
I'll take a look in the options on what's possible here.
Do you have an example parquet file that I can test this on?
Here is an example of a field with leading zeroes. When I Copy Page and paste into Excel it gets rid of the leading zeroes.
Thanks for the example. Do you also have a parquet file where the wrapping text occurs in excel?
Thanks for the example. Do you also have a parquet file where the wrapping text occurs in excel?
That one with the leading zeroes is doing the text wrapping in Excel as well.
If it's copying the HTML into the clipboard, perhaps it is including some sort of formatting markets that Excel is interpreting and forcing it to wrap?
Perhaps this could solve the leading zeroes getting messed up? Assuming you are copying an HTML table...
This would be for String columns:
<td style="mso-number-format:\@;">
https://dev.to/anrodriguez/styling-excel-cells-with-mso-number-format-css-attribute-updated-j6i
white-space: nowrap; might address text wrapping, but not sure exactly what is causing it.
For String in my previous post it got cut off, but this might fix the leading zeroes issues:
mso-number-format:"\@"
When I use Copy, and paste into Excel it looks like it is still including the following formatting options: -Bold -Wrap Text (this one especially ends up not looking great in Excel)
And I am not sure if it's possible, but let's say I have a String of "001000". When I paste this, Excel automatically changes it to a number 1000. I was not sure if it's possible to flag what is being copied to the clipboard as text explicitly so that it does not lose the leading the zeroes. I know this one is sort of an Excel issue since it's automatically casting to a whole number.