exceltk
exceltk copied to clipboard
Convert Excel sheet to markdown, json, tex, html, image and so on..
Excel toolkit.
Table SHOULD be edited by advanced GUI applications, BUT converted to any other format.
Convert Excel sheet to MarkDown Table
- HyperLink cell in Excel sheet will be retained as
[text](url)format - CrossLine cell in Excel sheet will be expanded to multirow
- Empty columns on the right side will be trimed, which is detected by the first 100 rows.
- Support set the precision of decimal
- Support to set markdown table aligin
- Convert newline in cell text into
<br/> - Cross sheet Hyperlink formula support, link formula like
HYPERLINK(test_sheet!C9,...)will be extract as[text](url)format automatic - Hyperlink formula support, link formula like
HYPERLINK(C9,...)will be extract as[text](url)format automatic
Usage:
exceltk.exe -t md -xls example.xlsexceltk.exe -t md -xls example.xls -sheet sheetnameexceltk.exe -t md -xls example.xlsxexceltk.exe -t md -xls example.xlsx -sheet sheetnameexceltk.exe -t md -p 2 -xls example.xls, where-p 2setting the decimal precision to 2exceltk.exe -t md -bhead -xls example.xls, which will use the first row to replace table header, and keep the head empty, so that the table will auto response in small screen device, this is just a simply solution.exceltk.exe -t cm, Now you can copy sheet from excel, then paster to any editor, which will be Markdown table.exceltk -t md -a r -xls example.xlsx, where the-aoption can be followd by a aligin character-a l: aligin left-a r: aligin right-a c: aligin center
Convert Excel to Json
chagne the -t option to json
exceltk.exe -t json -xls example.xls
Convert Excel to TeX
change the -t option to tex
exceltk.exe -t tex -xls example.xls- using
-st noption to split table into multitable - using
-snoption to adjust number, for example,1234656will be split into1 2 3 4 5 6, it the table width is too large, this is useful
Download:
0.1.3
- mac: https://github.com/fanfeilong/exceltk/blob/master/pub/exceltk.0.1.3.pkg
- windows: http://files.cnblogs.com/files/math/exceltk.0.1.3.zip
0.0.9 for windows
- http://fanfeilong.github.io/exceltk0.0.9.7z
- http://files.cnblogs.com/files/math/exceltk0.0.9.7z
3rd projects
ExcelTk integrated the following projects
How to build
Build on MacOS
- install .NET Core SDK 2.0.0-preview1-005977
- cd to the project dir
- run the following script step by step.
dotnet restore src/exceltk.slndotnet build src/exceltk.slndotnet run --project src/Exceltk/Exceltk.csproj -t md -xls src/test/test1.xlsx
- the
dotnet restore, this will take long time to install nupack files for publish target runtime, you can comment the following config insrc/Exceltk/Exceltk.csprojto ignore it.
<PropertyGroup>
<RuntimeIdentifiers>win-x86;osx-x64</RuntimeIdentifiers>
</PropertyGroup>
- run the following script to publish
dotnet publish -r osx-x64 src/exceltk.sln -c Release
Build on Windows
- you can also build for windows with the .NET Core SDK, and publish it
dotnet publish -r win-x86 src/exceltk.sln -c Release
- you can also build with the visual studio by load the
src/exceltk_vs.sln
Build on Linux (example by ubuntu-x64)
- install .NET Core SDK
- cd to the project dir
- append the
ubuntu-x64to following RuntimeIdentifiers insrc/Exceltk/Exceltk.csproj. you can find other RuntimeIdentifiers at: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog
<PropertyGroup>
<RuntimeIdentifiers>win-x86;osx-x64;ubuntu-x64</RuntimeIdentifiers>
</PropertyGroup>
- run the following script step by step.
dotnet restore src/exceltk.slndotnet build src/exceltk.slndotnet run --project src/Exceltk/Exceltk.csproj -t md -xls src/test/test1.xlsx
- run the following script to publish
dotnet publish -r ubuntu-x64 src/exceltk.sln -c Release