Validation for an Excel file - excel

Perhaps this is a dumb question, but I was wondering if there's any standard for having Excel validation across files? What I mean by that is something like:
XSD for XML: https://www.w3.org/XML/Schema
JSON Schema: https://json-schema.org/implementations.html
CSV Schema: https://digital-preservation.github.io/csv-schema/csv-schema-1.1.html
Excel: ??
Or is the solution for this usually "Export it to <this_format> and validate it using those tools?" How this this usually done, or it's not?

Excel is a proprietary tool with its own data format. It can export a spreadsheet/worksheet (not the same thing) into various other formats.
For data interchange, the most common Excel import/export format is CSV. There is a standard for CSV but it does not specify any validation of the field names or types. If you want that, you will need something like https://en.wikipedia.org/wiki/Data_Format_Description_Language.

Related

What date format can you use in CSV that Excel will recognize unambiguously?

Surely someone before me has needed to produce a year, month, day in a single field for a CSV that "just works" in popular versions of Microsoft Excel? I want only a date, no timestamp, though I suppose I could include 00:00 or something like that if I absolutely had to.
Panagiotis Kanavos points out that "Excel can only import it and try to guess whether the text values correspond to a certain type, using the user's locale settings." My question is about what format will cause Excel to guess correctly in the US and Europe, and ideally everywhere else.
If it's impossible or unreliable to do this in CSV, I will accept a link to using some zipped XML format or something that Excel and other spreadsheets accept universally instead of CSV.
This is NOT a duplicate of of the following:
Best timestamp format for CSV/Excel? because I want it without a timestamp.
What are the "standard unambiguous date" formats? because I need CSV specifically for Excel to read.
Excel CSV date format because I need Excel import from CSV, not export.
Read Date Format in PHP EXCEL because I need Microsoft Excel, not PHP Excel.
Excel will recognize YYYY-MM-DD as a global standard.
Cartoon from: https://www.xkcd.com/1179/
The difficulty with answering your question is that to test the proposed answer, the format must be tested in "all popular versions" of Excel
I have several versions of Excel and in my testing this:
worked in all my versions (English-US Locale)

How to make Excel support a custom file format?

Is there a way to make Microsoft Excel support a new file format for input and output - as a selectable file format in the "Open File" and "Save File" dialogs? Maybe by writing an addin or something like this?
My goal is to use Excel to read and write tabular data stored in a custom format - let's say JSON but it's not decided yet. I know that I could write an application that does the conversion from my custom format to the Excel format, but that's explicitly not I am looking for.

Reading custom data format into Excel VBA

I have a file of extension *.qub that I would like to read into Excel. The file contains spacecraft instrument data. The file has two parts, a SFDU-defined text header followed by binary data.
Ideally, we would like the user to be able to access the files using Excel's built-in File-->Open and File-->Save functionality to import/export this *.qub format.
What is the best way to create a custom file reader/writer in Excel?
Thank you!

Parsing excel data ( containing xml ) in VBA

I have a simple excel file containing rows and columns. One of the column contains rows of data which is string like this (XML data)
<Employee Name="R1" Designation="Developer">
<SkillSet Language="C#"/>
</Employee>
<Employee Name="E2" Designation="Developer">
<SkillSet Language="Java"/>
</Employee>
I would like to read this information in the excel file, parse it based on particular skillset and put them in the same excel workbook in adjacent column. I may need to provide a button click which may trigger the action.
How do I approach this problem.
Should I write a macro or should I write an excel addin. The excel can be either 2003 or earlier/2007/2010.
I can think of writing a user defined function to read the cell data but, how do I read through the columns in vb and also how do I re-use my function across different excel-workbooks.
Although this maybe coming to you at a late hour, however I had thesame problem as you mention. I'm also kind of new to VBA. My client wanted a database application in Access 2003. But after some persuation, I was able to convince them to adapt Access 2007. Which by the way, it's still not reliable, to develop a multi-lingual application.
Anyway to cut the story short, I was able to achieve same, after some google search and using the code I found here;
http://www.freevbcode.com/ShowCode.asp?ID=2922
and here
Parsing XML in VBA
Hope you find this links helpful cheers.
Add a reference (Tools-->References) to an XML parser, e.g., Microsoft XML, v6.0 -- my MS Access 2010 installation has a seven XML parsers provided by Microsoft. Declare an instance of the parser and use its properties and methods as you need.

Vba-Excel How to generate XML file from a SpreadSheet of Excel?

I have been searching for the logic to convert the SpreadSheet data of an excel into XML format.
I have the thousands of data like shown below. i want to convert this into XML format.
Anyone please help me, any help would be appreciated greatly.
According to the screenshot, your Excel version allows to save your document using XML Spreadsheet 2003 format: Save As... > Other Formats and locate it in the dropdown (at least for Excel 2007 it works as described).
Resulting XML will contain much of the native Excel Workbook fields and nodes, but they're might be easily removed using any more or less advanced XML editor, e.g. Altova XMLSpy or any similar. However, cleanup depends entirely on your further needs.
For your convenience may see sample Excel book and XML generated from it as described above: https://www.dropbox.com/s/kxmxu2tq52y4m9b/ExcelToXML.zip
Good luck!

Resources