Package: exceltowiki
ExcelToWikiUse is trivial as shown below:from exceltowiki import exceltowiki
import exceltowiki

e2w = excelToWiki("./test.xlsx",["Sheet1"],"blue","yellow")
print e2w.sheetnames
print e2w.getSheet("Sheet1")
print e2w.getWorkbook()
e2w = excelToWiki("./test.xlsx")
# print sheet names in the excel workbook
print e2w.sheetnames
# print wiki text for sheet named Sheet1
print e2w.getSheet("Sheet1")
# print wiki text for entire workbook
print e2w.getWorkbook()Options are:exceltowiki(excelworkbook, [list of sheet names to process], caption foreground color, caption background color, preserve col widths)Where caption is set from the sheet name (no way to currently modify this).Featuresexceltowiki can capture:Font styling: bold, underline, strikethroughCell styling: foreground color, background colorSheet features: merged cells are captured, sheet name is captured as caption to the wiki tableexceltowiki currently cannot capture anything more complex than the above list. Features such as ‘format as table’, conditional formatting, and other advanced items are not inspected or captured. For these, only the data value in the cells will be captured.Release Notes: 0.1.19Added a better handler for date format detection and conversion. This is still very hacky but it works.
MS date format to datetime strftime is never going to be straight forward until there is a method to
obtain the resulting formatted string by itself.Release Notes: 0.1.18Inline double-pipe separator had a bug where a newline in the cell requires the wiki table to use a single pipe character.Release Notes: 0.1.17For better presentation of empty cells in wiki the cell contents are replaced with ‘&nbsp;‘ this retains any spacing/sizing related nature of the table which would otherwise collapse.Release Notes: 0.1.16Wiki text within a cell was not being formatted via wiki because of being inlined. Slight update to fix this.
The ‘INLINE_FMT’ flag is now deprecated.Release Notes: 0.1.15Added preserve_width option
Update to latest openpyxl - note that newer openpyxl broke something in colwidth with 0.1.14Release Notes: 0.1.14Minor updateRelease Notes: 0.1.13Added a version from git tag
Handling numeric, date and percent values a bit betterRelease Notes: 0.1.12Cleanup releaseRelease Notes: 0.1.11Added support for inline format with double-pipe notation.
Removed unneeded imports.
Minor fixes to value retrievalRelease Notes: 0.1.10Packaging was not following best practice of examples within the package.
Bug fix: Unicode was not correctly handled.Release Notes: 0.1.9Minor font issues fixed. Italics and font-name were being ignored.
Some other minor items fixed.Release Notes: 0.1.8Added support for hyperlinks:Unfortunately openpyxl does not yet support reading hyperlinks.The way to enter hyperlinks is to place the hyperlink and wiki display text in a cell, such as: “http://yahoo.comYahoo!”Any cell containing “http” will be wrapped within []s.Bugs:Caption was missing, added it back.Caption style was incorrectly set. fixed.unneeded parameter headerRow removed.unneeded cellToWiki method removedRelease Notes: 0.1.7Cleaner output of wiki text.
- Common cell styles across the row are boiled up to row style.
- Common row style items are boiled up to table.Release Notes: 0.1.6Minor: black was being ignored for bg color as well. Instead of only the fg colorRelease Notes: 0.1.5Added border as default.Removed font color from markup when color is black