Is there any existing Python library that can validate data in Excel format? Or what kind of keyword should I use to search such an open source project? Thanks.
+1
A:
I`m not sure what are you looking for, but there are three libraries that, in combination, can read and write excel files:
They read and save binary excel archives both in windows and linux. There are functions for formatting data and styles.
If you want to check if some data column is in a given format you can do it with these libs (basically with xlrd).
joaquin
2010-05-15 19:35:52
Thanks a lot! What I mean to data validation is same in Excel's native validation feature. Excel allow user to set some sort of rules to columns, like what value are acceptable, or only accept unique value. Where I want to automate this task for multiple Excel files. So I am looking something that can catch invalid data in Excel files and output those lines for easier fixing the errors.Thanks.
Stan
2010-05-15 19:49:32
Stan, then you can do it with the above libs. If you want to use native Excel functions, then take a look at pywin32 lib (win32all) from Mark Hammond. With this library you can access Excel as a COM object and use native functions
joaquin
2010-05-15 19:56:22
+2
A:
[Disclosure: I'm the author of xlrd]
xlrd allows you to extract data from XLS files. XLSX support is in alpha testing; e-mail me if you need it. You get told precisely what is in each cell (Excel cell type and value). It runs on Python 2.1 to 2.7 on any platform. You don't need Windows. You don't need Excel to be installed on your machine. Start with the tutorial found here.
John Machin
2010-05-15 21:26:41