Package: xls2xlsx
Convert xls file to xlsxFree software: MIT licenseDocumentation:https://xls2xlsx.readthedocs.io.FeaturesConvert.xlsfiles to.xlsxusing xlrd and openpyxl.Convert.htmand.mhtfiles containing tables or excel contents to.xlsxusing beautifulsoup4 and openpyxl.We attempt to support anything that the underlying packages used will support.  For example, the following are supported for both input types:Multiple worksheetsText, Numbers, Dates/Times, UnicodeFonts, text color, bold, italic, underline, double underline, strikeoutSolid and Pattern Fills with colorBorders: Solid, Hair, Thin, Thick, Double, Dashed, Dotted; with colorAlignment: Horizontal, Vertical, Rotated, Indent, Shrink To FitNumber Formats, including unicode currency symbolsHidden Rows and ColumnsMerged CellsHyperlinks (only 1 per cell)CommentsThese features are additionally supported by the.xlsinput format:Freeze panesThese features are additional supported by the.htmand.mhtinput formats:ImagesNot supported by either format:Conditional Formatting (the current stylings are preserved)Formulas (the calculated values are preserved)Charts (the image of the chart is handled by.htmand.mhtinput formats)Drawings (the image of the drawing is handled by.htmand.mhtinput formats)Pivot tables (the current data is preserved)Text boxes (converted to an image by.htmand.mhtinput formats)Shapes and Clip Art (converted to an image by.htmand.mhtinput formats)Autofilter (the current filtered out rows are preserved)Rich text in cells (openpyxl doesn’t support this: only styles applied to the entire cell are preserved)Named RangesMacros (VBA)InstallationTo install xls2xlsx, run this command in your terminal:$pipinstallxls2xlsxThis is the preferred method to install xls2xlsx, as it will always install the most recent stable release.UsageTo use xls2xlsx from the command line:$xls2xlsx[-v]file.xls...This will createfile.xlsxin the current folder.file.xlscan be any.xls,.htm, or.mhtfile and can also be a URL.  The-vflag will print the input and output filename.To use xls2xlsx in a project:fromxls2xlsximportXLS2XLSXx2x=XLS2XLSX("spreadsheet.xls")x2x.to_xlsx("spreadsheet.xlsx")Alternatively:fromxls2xlsximportXLS2XLSXx2x=XLS2XLSX("spreadsheet.xls")wb=x2x.to_xlsx()The xls2xlsx.to_xlsx method returns the filename given.  If no filename is provided, the method returns the openpyxl workbook.The input file can be in any of the following formats:Excel 97-2003 workbook (.xls)Web page (.htm,.html), optionally including a _Files folderSingle file web page (.mht,.mhtml)The input specified can also be any of the following:A filename / pathnameA urlA file-like object (opened in Binary mode for.xlsand either Binary or Text mode otherwise)The contents of a.xlsfile as abytesobjectThe contents of a.htmor.mhtfile as astrobjectNote: The file format is determined by examining the file contents,notby looking at the file extension.DependenciesPython >= 3.6 is required.These packages are also required:xlrd, openpyxl, requests, beautifulsoup4, Pillow,python-dateutil,cssutils, webcolors,currency-symbols,fonttools, PyYAML.Implementation NotesThe.htmand.mhtinput format conversion uses ImageFont from Pillow to measure the size (width and height) of cell contents.  The first time you use it, it will look for font files in standard places on your system and create a Font Name to filename mapping.  If the proper font files are not found on your system corresponding to the fonts used in the input file, then as a backup, an estimation algorithm is used.If passed a.mhtfile (or url), the temporary folder name specified in the file will be used to unpack the contents for processing, then this folder will be removed when done.CreditsDevelopment LeadJoe Cool <snoopyjc@gmail.com>ContributorsNone yet. Why not be the first?AcknowledgementsA portion of the code is based on the work of John Ricco (johnricco226@gmail.com), Apr 4, 2017:https://johnricco.github.io/2017/04/04/python-html/This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.0 (2023-01-05)Modernize for more recent pythons and more recent packages. Drop support for Python 3.6.  Fix issues #11, #14, #16. Add feature #12.0.1.5 (2020-11-03)Fix issues #1, #3, #50.1.4 (2020-11-02)Fix issue #40.1.3 (2020-10-15)Fix issue #2 - cli not working0.1.0 (2020-09-13)First release on PyPI.