RickStrahl / MarkdownMonster

An extensible Markdown Editor, Viewer and Weblog Publisher for Windows
https://markdownmonster.west-wind.com
Other
1.58k stars 236 forks source link

Paste table and import CSV support for Excel #447

Closed jessehouwing closed 5 years ago

jessehouwing commented 5 years ago

I tried to use Excel to "paste" a table into my markdown file.

The "Paste from Clipboard" pastes a long list of HTML tags in each cell. The "Import from CSV" gives an error for the CSV files generated regardless of the codepage used to save the file.

Paste HTML as markdown gives me:

Capability name Capability value <span style="box-sizing: border-box;" data-bind="text: key">Agent.ComputerName</span> <span style="box-sizing: border-box;" data-bind="text: value">SNAPPIE</span> <span style="box-sizing: border-box;" data-bind="text: key">Agent.HomeDirectory</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\TfsData\jessehouwing</span> <span style="box-sizing: border-box;" data-bind="text: key">Agent.Name</span> <span style="box-sizing: border-box;" data-bind="text: value">SNAPPIE</span> <span style="box-sizing: border-box;" data-bind="text: key">Agent.OS</span> <span style="box-sizing: border-box;" data-bind="text: value">Windows_NT</span> <span style="box-sizing: border-box;" data-bind="text: key">Agent.OSVersion</span> <span style="box-sizing: border-box;" data-bind="text: value">10.0.17763</span> <span style="box-sizing: border-box;" data-bind="text: key">Agent.Version</span> <span style="box-sizing: border-box;" data-bind="text: value">2.136.1</span> <span style="box-sizing: border-box;" data-bind="text: key">ALLUSERSPROFILE</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\ProgramData</span> <span style="box-sizing: border-box;" data-bind="text: key">APPDATA</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Roaming</span> <span style="box-sizing: border-box;" data-bind="text: key">AzurePS</span> <span style="box-sizing: border-box;" data-bind="text: value">5.7.0</span> <span style="box-sizing: border-box;" data-bind="text: key">ChocolateyInstall</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\ProgramData\chocolatey</span> <span style="box-sizing: border-box;" data-bind="text: key">Cmd</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\WINDOWS\system32\cmd.exe</span> <span style="box-sizing: border-box;" data-bind="text: key">CommonProgramFiles</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files\Common Files</span> <span style="box-sizing: border-box;" data-bind="text: key">CommonProgramFiles(x86)</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Common Files</span> <span style="box-sizing: border-box;" data-bind="text: key">CommonProgramW6432</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files\Common Files</span> <span style="box-sizing: border-box;" data-bind="text: key">COMPUTERNAME</span> <span style="box-sizing: border-box;" data-bind="text: value">SNAPPIE</span> <span style="box-sizing: border-box;" data-bind="text: key">ComSpec</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\WINDOWS\system32\cmd.exe</span> <span style="box-sizing: border-box;" data-bind="text: key">docker</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files\Docker\Docker\Resources\bin\docker.exe</span> <span style="box-sizing: border-box;" data-bind="text: key">DotNetFramework</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework64\v4.0.30319</span> <span style="box-sizing: border-box;" data-bind="text: key">DotNetFramework_2.0</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework\v2.0.50727</span> <span style="box-sizing: border-box;" data-bind="text: key">DotNetFramework_2.0_x64</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework64\v2.0.50727</span> <span style="box-sizing: border-box;" data-bind="text: key">DotNetFramework_3.0</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework\v3.0</span> <span style="box-sizing: border-box;" data-bind="text: key">DotNetFramework_3.0_x64</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework64\v3.0</span> <span style="box-sizing: border-box;" data-bind="text: key">DotNetFramework_3.5</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework\v3.5</span> <span style="box-sizing: border-box;" data-bind="text: key">DotNetFramework_3.5_x64</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework64\v3.5</span> <span style="box-sizing: border-box;" data-bind="text: key">DotNetFramework_4.7.0</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework\v4.0.30319</span> <span style="box-sizing: border-box;" data-bind="text: key">DotNetFramework_4.7.0_x64</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework64\v4.0.30319</span> <span style="box-sizing: border-box;" data-bind="text: key">DriverData</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\System32\Drivers\DriverData</span> <span style="box-sizing: border-box;" data-bind="text: key">ES_HEAP_SIZE</span> <span style="box-sizing: border-box;" data-bind="text: value">9600m</span> <span style="box-sizing: border-box;" data-bind="text: key">ESET_OPTIONS</span> <span style="box-sizing: border-box;" data-bind="text: key">FSHARPINSTALLDIR</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft SDKs\F#\10.1\Framework\v4.0\</span> <span style="box-sizing: border-box;" data-bind="text: key">InteractiveSession</span> <span style="box-sizing: border-box;" data-bind="text: value">FALSE</span> <span style="box-sizing: border-box;" data-bind="text: key">java</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Java\jre1.8.0_181</span> <span style="box-sizing: border-box;" data-bind="text: key">java_8</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Java\jre1.8.0_181</span> <span style="box-sizing: border-box;" data-bind="text: key">JAVA_HOME</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files\Microsoft Team Foundation Server 15.0\Search\Java\jre1.8.0_141</span> <span style="box-sizing: border-box;" data-bind="text: key">LOCALAPPDATA</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Local</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild_12.0</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\MSBuild\12.0\bin\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild_14.0</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\MSBuild\14.0\bin\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild_14.0_x64</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\MSBuild\14.0\bin\amd64\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild_15.0</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild_15.0_x64</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin\amd64\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild_2.0</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework\v2.0.50727\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild_2.0_x64</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework64\v2.0.50727\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild_3.5</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework\v3.5\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild_3.5_x64</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework64\v3.5\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild_4.0</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework\v4.0.30319\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild_4.0_x64</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Windows\Microsoft.NET\Framework64\v4.0.30319\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSBuild_x64</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin\amd64\</span> <span style="box-sizing: border-box;" data-bind="text: key">MSMPI_BIN</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files\Microsoft MPI\Bin\</span> <span style="box-sizing: border-box;" data-bind="text: key">node.js</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files\nodejs\node.exe</span> <span style="box-sizing: border-box;" data-bind="text: key">npm</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files\nodejs\npm.cmd</span> <span style="box-sizing: border-box;" data-bind="text: key">NUMBER_OF_PROCESSORS</span> <span style="box-sizing: border-box;" data-bind="text: value">8</span> <span style="box-sizing: border-box;" data-bind="text: key">OS</span> <span style="box-sizing: border-box;" data-bind="text: value">Windows_NT</span> <span style="box-sizing: border-box;" data-bind="text: key">PATHEXT</span> <span style="box-sizing: border-box;" data-bind="text: value">.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW</span> <span style="box-sizing: border-box;" data-bind="text: key">PowerShell</span> <span style="box-sizing: border-box;" data-bind="text: value">5.1.17763.1</span> <span style="box-sizing: border-box;" data-bind="text: key">PROCESSOR_ARCHITECTURE</span> <span style="box-sizing: border-box;" data-bind="text: value">AMD64</span> <span style="box-sizing: border-box;" data-bind="text: key">PROCESSOR_IDENTIFIER</span> <span style="box-sizing: border-box;" data-bind="text: value">Intel64 Family 6 Model 158 Stepping 9, GenuineIntel</span> <span style="box-sizing: border-box;" data-bind="text: key">PROCESSOR_LEVEL</span> <span style="box-sizing: border-box;" data-bind="text: value">6</span> <span style="box-sizing: border-box;" data-bind="text: key">PROCESSOR_REVISION</span> <span style="box-sizing: border-box;" data-bind="text: value">9E+09</span> <span style="box-sizing: border-box;" data-bind="text: key">ProgramData</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\ProgramData</span> <span style="box-sizing: border-box;" data-bind="text: key">ProgramFiles</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files</span> <span style="box-sizing: border-box;" data-bind="text: key">ProgramFiles(x86)</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)</span> <span style="box-sizing: border-box;" data-bind="text: key">ProgramW6432</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files</span> <span style="box-sizing: border-box;" data-bind="text: key">PSModulePath</span> <span style="box-sizing: border-box;" data-bind="text: value">%ProgramFiles%\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\;C:\Program Files\Microsoft Azure Recovery Services Agent\bin\Modules\</span> <span style="box-sizing: border-box;" data-bind="text: key">PUBLIC</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Users\Public</span> <span style="box-sizing: border-box;" data-bind="text: key">PYTHON</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Users\JesseHouwing\AppData\Local\Programs\Python\Python36\</span> <span style="box-sizing: border-box;" data-bind="text: key">SEARCH_ES_INDEX_PATH</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\TfsData\Search\IndexStore</span> <span style="box-sizing: border-box;" data-bind="text: key">SqlPackage</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\SqlPackage.exe</span> <span style="box-sizing: border-box;" data-bind="text: key">SystemDrive</span> <span style="box-sizing: border-box;" data-bind="text: value">C:</span> <span style="box-sizing: border-box;" data-bind="text: key">SystemRoot</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\WINDOWS</span> <span style="box-sizing: border-box;" data-bind="text: key">TEAMCITY_SERVER_OPTS</span> <span style="box-sizing: border-box;" data-bind="text: value">-Djava.library.path=C:\ProgramData\JetBrains\TeamCity\lib\jdbc\sqljdbc_auth.dll</span> <span style="box-sizing: border-box;" data-bind="text: key">TEMP</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Local\Temp</span> <span style="box-sizing: border-box;" data-bind="text: key">TMP</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Local\Temp</span> <span style="box-sizing: border-box;" data-bind="text: key">USERDOMAIN</span> <span style="box-sizing: border-box;" data-bind="text: value">XPIRIT</span> <span style="box-sizing: border-box;" data-bind="text: key">USERNAME</span> <span style="box-sizing: border-box;" data-bind="text: value">SNAPPIE$</span> <span style="box-sizing: border-box;" data-bind="text: key">USERPROFILE</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\WINDOWS\ServiceProfiles\NetworkService</span> <span style="box-sizing: border-box;" data-bind="text: key">VisualStudio</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\</span> <span style="box-sizing: border-box;" data-bind="text: key">VisualStudio_15.0</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\</span> <span style="box-sizing: border-box;" data-bind="text: key">VisualStudio_IDE</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\</span> <span style="box-sizing: border-box;" data-bind="text: key">VisualStudio_IDE_15.0</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\</span> <span style="box-sizing: border-box;" data-bind="text: key">VS140COMNTOOLS</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\</span> <span style="box-sizing: border-box;" data-bind="text: key">VSTest</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow</span> <span style="box-sizing: border-box;" data-bind="text: key">VSTest_15.0</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow</span> <span style="box-sizing: border-box;" data-bind="text: key">windir</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\WINDOWS</span> <span style="box-sizing: border-box;" data-bind="text: key">WindowsKit</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Windows Kits\8.1\</span> <span style="box-sizing: border-box;" data-bind="text: key">WindowsKit_8.1</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Windows Kits\8.1\</span> <span style="box-sizing: border-box;" data-bind="text: key">WindowsSdk</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A</span> <span style="box-sizing: border-box;" data-bind="text: key">WindowsSdk_8.1</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A</span> <span style="box-sizing: border-box;" data-bind="text: key">WindowsSdk_8.1_NetFx40Tools</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools</span> <span style="box-sizing: border-box;" data-bind="text: key">WindowsSdk_8.1_NetFx40Tools_x64</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64</span> <span style="box-sizing: border-box;" data-bind="text: key">WIX</span> <span style="box-sizing: border-box;" data-bind="text: value">C:\Program Files (x86)\WiX Toolset v3.11\</span>

And import CVS shows:

image

With my default locale (nl-NL) Excel generates ';' separated CSV files. The default separator is stored in the I18n and g10n settings in Windows.

After Search and Replacing the ";" with ","I was able to import the file.

Capability name;Capability value
Agent.ComputerName;SNAPPIE
Agent.HomeDirectory;C:\TfsData\jessehouwing
Agent.Name;SNAPPIE
Agent.OS;Windows_NT
Agent.OSVersion;10.0.17763
Agent.Version;2.136.1
ALLUSERSPROFILE;C:\ProgramData
APPDATA;C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Roaming
AzurePS;5.7.0
ChocolateyInstall;C:\ProgramData\chocolatey
Cmd;C:\WINDOWS\system32\cmd.exe
CommonProgramFiles;C:\Program Files\Common Files
CommonProgramFiles(x86);C:\Program Files (x86)\Common Files
CommonProgramW6432;C:\Program Files\Common Files
COMPUTERNAME;SNAPPIE
ComSpec;C:\WINDOWS\system32\cmd.exe
docker;C:\Program Files\Docker\Docker\Resources\bin\docker.exe
DotNetFramework;C:\Windows\Microsoft.NET\Framework64\v4.0.30319
DotNetFramework_2.0;C:\Windows\Microsoft.NET\Framework\v2.0.50727
DotNetFramework_2.0_x64;C:\Windows\Microsoft.NET\Framework64\v2.0.50727
DotNetFramework_3.0;C:\Windows\Microsoft.NET\Framework\v3.0
DotNetFramework_3.0_x64;C:\Windows\Microsoft.NET\Framework64\v3.0
DotNetFramework_3.5;C:\Windows\Microsoft.NET\Framework\v3.5
DotNetFramework_3.5_x64;C:\Windows\Microsoft.NET\Framework64\v3.5
DotNetFramework_4.7.0;C:\Windows\Microsoft.NET\Framework\v4.0.30319
DotNetFramework_4.7.0_x64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319
DriverData;C:\Windows\System32\Drivers\DriverData
ES_HEAP_SIZE;9600m
ESET_OPTIONS;
FSHARPINSTALLDIR;C:\Program Files (x86)\Microsoft SDKs\F#\10.1\Framework\v4.0\
InteractiveSession;FALSE
java;C:\Program Files (x86)\Java\jre1.8.0_181
java_8;C:\Program Files (x86)\Java\jre1.8.0_181
JAVA_HOME;C:\Program Files\Microsoft Team Foundation Server 15.0\Search\Java\jre1.8.0_141
LOCALAPPDATA;C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Local
MSBuild;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin\
MSBuild_12.0;C:\Program Files (x86)\MSBuild\12.0\bin\
MSBuild_14.0;C:\Program Files (x86)\MSBuild\14.0\bin\
MSBuild_14.0_x64;C:\Program Files (x86)\MSBuild\14.0\bin\amd64\
MSBuild_15.0;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin\
MSBuild_15.0_x64;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin\amd64\
MSBuild_2.0;C:\Windows\Microsoft.NET\Framework\v2.0.50727\
MSBuild_2.0_x64;C:\Windows\Microsoft.NET\Framework64\v2.0.50727\
MSBuild_3.5;C:\Windows\Microsoft.NET\Framework\v3.5\
MSBuild_3.5_x64;C:\Windows\Microsoft.NET\Framework64\v3.5\
MSBuild_4.0;C:\Windows\Microsoft.NET\Framework\v4.0.30319\
MSBuild_4.0_x64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
MSBuild_x64;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin\amd64\
MSMPI_BIN;C:\Program Files\Microsoft MPI\Bin\
node.js;C:\Program Files\nodejs\node.exe
npm;C:\Program Files\nodejs\npm.cmd
NUMBER_OF_PROCESSORS;8
OS;Windows_NT
PATHEXT;".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW"
PowerShell;5.1.17763.1
PROCESSOR_ARCHITECTURE;AMD64
PROCESSOR_IDENTIFIER;Intel64 Family 6 Model 158 Stepping 9, GenuineIntel
PROCESSOR_LEVEL;6
PROCESSOR_REVISION;9000000000
ProgramData;C:\ProgramData
ProgramFiles;C:\Program Files
ProgramFiles(x86);C:\Program Files (x86)
ProgramW6432;C:\Program Files
PSModulePath;"%ProgramFiles%\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\;C:\Program Files\Microsoft Azure Recovery Services Agent\bin\Modules\"
PUBLIC;C:\Users\Public
PYTHON;C:\Users\JesseHouwing\AppData\Local\Programs\Python\Python36\
SEARCH_ES_INDEX_PATH;C:\TfsData\Search\IndexStore
SqlPackage;C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\SqlPackage.exe
SystemDrive;C:
SystemRoot;C:\WINDOWS
TEAMCITY_SERVER_OPTS;-Djava.library.path=C:\ProgramData\JetBrains\TeamCity\lib\jdbc\sqljdbc_auth.dll
TEMP;C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Local\Temp
TMP;C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Local\Temp
USERDOMAIN;XPIRIT
USERNAME;SNAPPIE$
USERPROFILE;C:\WINDOWS\ServiceProfiles\NetworkService
VisualStudio;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\
VisualStudio_15.0;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\
VisualStudio_IDE;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\
VisualStudio_IDE_15.0;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\
VS140COMNTOOLS;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
VSTest;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow
VSTest_15.0;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow
windir;C:\WINDOWS
WindowsKit;C:\Program Files (x86)\Windows Kits\8.1\
WindowsKit_8.1;C:\Program Files (x86)\Windows Kits\8.1\
WindowsSdk;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A
WindowsSdk_8.1;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A
WindowsSdk_8.1_NetFx40Tools;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
WindowsSdk_8.1_NetFx40Tools_x64;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64
WIX;C:\Program Files (x86)\WiX Toolset v3.11\
RickStrahl commented 5 years ago

Excel pastes the document as HTML it looks like, so that's why you are seeing the HTML tags. I have to take a look and see if the data also comes across as text which presumably would be the CSV data.

I wasn't aware that there's a difference for the CSV delimiter for different locales. Looks like CultureInfo.TextInfo.ListSeparator:

image

Will take a look.

jessehouwing commented 5 years ago

I hate the list separator. Nobody knows about it and it makes no sense whatsoever.

On Sun, 30 Sep 2018, 22:45 Rick Strahl, notifications@github.com wrote:

Excel pastes the document as HTML it looks like, so that's why you are seeing the HTML tags. I have to take a look and see if the data also comes across as text which presumably would be the CSV data.

I wasn't aware that there's a difference for the CSV delimiter for different locales. Looks like CultureInfo.TextInfo.ListSeparator:

[image: image] https://user-images.githubusercontent.com/1374013/46262499-f094e700-c49d-11e8-9ea1-46a489b397fb.png

Will take a look.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RickStrahl/MarkdownMonster/issues/447#issuecomment-425750682, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS1ffiKPzbgTSVcuRGxXbHpwMIVsEks5ugS14gaJpZM4XA9Te .

RickStrahl commented 5 years ago

Yeah right. So the question is how should we specify the separator. The parser I'm using supports providing the separator and apparently it defaults to , which I think is sensitive.

I think using the native language default (ie. the ListSeparator) is going to screw lots of people up too because most CSV files in the wild use commas. I can add a configuration setting in the MM settings, but that's going to be hard to discover.

jessehouwing commented 5 years ago

I'd love it if you could make the copy/paste of tabular data from excel work. Try the advanced "import csv" dialog in excel to see how bad the csv 'standard' actually is ;).

On Sun, 30 Sep 2018, 22:53 Rick Strahl, notifications@github.com wrote:

Yeah right. So the question is how should we specify the separator. The parser I'm using supports providing the separator and apparently it defaults to , which I think is sensitive.

I think using the native language default (ie. the ListSeparator) is going to screw lots of people up too because most CSV files in the wild use commas. I can add a configuration setting in the MM settings, but that's going to be hard to discover.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RickStrahl/MarkdownMonster/issues/447#issuecomment-425751244, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS-d4HMghQjKKLIADh1x6Y-6EKfUTks5ugS9OgaJpZM4XA9Te .

RickStrahl commented 5 years ago

So the Paste Table behavior is meant to paste existing HTML or Markdown tables into the editor.

I have to experiment and see if I can manage to get CSV worked into that. The problem is that the code currently checks for HTML first and Excel exports both HTML and the CSV. But Html and table checking happens first so the HTML overrides the text handling.

I think your idea of having a completely separate dialog for the import is probably the right choice - dialog would let you choose where the CSV comes from (clipboard, csv file) and also allow you to select the separator.

FWIW, the table editor currently won't do very with large tables (ie. hundreds of rows) of data due to the way it's implemented. It's on the list for re-writing but I'm a bit strapped for time at the moment so this won't happen right away.

jessehouwing commented 5 years ago

I first tried copy/pasting a table from the browser, but it left a lot of messy style tags and other useless attributes in the paste. Not readable at all.

I then thought, let's round trip through excel's paste plain text into cells, that didn't work, got different unreadable html ;D.

So html to excel to csv to vs code search & replace fixed me :).

Excel does some clever guessing about the separator character and also has a bit of quote and newline behavior detection. All in all csv is probably the least documented specification out there :D.

On Sun, 30 Sep 2018, 23:02 Rick Strahl, notifications@github.com wrote:

So the Paste Table behavior is meant to paste existing HTML or Markdown tables into the editor.

I have to experiment and see if I can manage to get CSV worked into that. The problem is that the code currently checks for HTML first and Excel exports both HTML and the CSV. But Html and table checking happens first so the HTML overrides the text handling.

I think your idea of having a completely separate dialog for the import is probably the right choice - dialog would let you choose where the CSV comes from (clipboard, csv file) and also allow you to select the separator.

FWIW, the table editor currently won't do very with large tables (ie. hundreds of rows) of data due to the way it's implemented. It's on the list for re-writing but I'm a bit strapped for time at the moment so this won't happen right away.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RickStrahl/MarkdownMonster/issues/447#issuecomment-425751820, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS_wZb-p7rRaVJBQti8Ep-aufyMeqks5ugTFpgaJpZM4XA9Te .

RickStrahl commented 5 years ago

So I gave this a first shot...

image

This dialog pops up when you click on Load from CSV. File prompts for file name and works pretty much as before. You can explicitly set the delimiter.

For clipboard, the code reads the clipboard and tries to figure out the delimiter (basically it looks for specific delimiters in every line (tab, comma and the list separator) and sets the separator it finds. Excel exports with tabs so this is why this is kind of important because there's no easy way to see what actually gets exported.

I'll pop this up in a minute in the latest preview release (v1.13.2 or later)