EXCEL 2010 VB code xml data format - excel

I have a complex spreadsheet that I need to get into xml data format. I've used Excel 2010 to create the complex spreadsheet. The spreadsheet itself has multiple tabs, and a table with a lot of formulas. The spreadsheet also contains some VB code for hiding a tab unless it is a specific user. I need this in XML data format, along with the VB code intact. If I save it as XML Spreadsheet 2003 format, it gives the correct formatting, however the VB code is lost during the saving of the spreadsheet. Is there an option out there to save this file in XML Spreadsheet 2003 format that will keep the VB code?

Related

How to format a formula in Microsoft Excel to be in percentage format DIRECTLY in the CSV source file

The problem:
For example, my CSV data is like so: ['=B3/B5'] which displays 0.1 in my Excel sheet but I need it to produce 10%.
I need to be able to fix this from the CSV source data because I'm exporting a CSV file from my website so that means no excel formatting to percentages as I need it to work out of the box for users.
Preferably the solution should be able to support Excel 2007. Google Sheets has a =to_percent(B3/B5) function which works well but I need the equivalent for Excel 2007.
I had a look at this answer: https://superuser.com/questions/318420/formatting-a-comma-delimited-csv-to-force-excel-to-interpret-value-as-a-string
But doesn't seem to directly address the problem.
You could use =B3/B5*100&"%"
Note that this will not be saved as a number (ex. 22.1%) rather as text, because you can't use number formats in a CSV file.

How do you make a workbook or worksheet read only using SpreadsheetML / Excel 2003 XML?

I am using SpreadsheetML to generate an Excel spreadsheet with multiple worksheets.
I would like to make the document read only when opened with Excel. How can I do this?
(I appreciate that a user could open the XML file as text and do what they want with it so this is read-only in the loosest sense.)
Thanks
Spreadsheet ML references:
https://en.wikipedia.org/wiki/Microsoft_Office_XML_formats#Excel_XML_Spreadsheet_example
http://m8y.org/Microsoft_Office_2003_XML_Reference_Schemas/Help/html/spreadsheetml_HV01151864.htm
https://en.wikipedia.org/wiki/SpreadsheetML

Automate opening and formatting of csv file in unix

My requirement is as follows:
Open an input csv file in spreadsheet in unix (like ooffice)
Post process the excel for following requirements:
Post process a column such that fields with number less that 0 appear as red
Put filters on top of each relevant columns (As we can do in Microsoft excel)
save the file in .xls (or any other format) such that when opened in microsoft excel, the data formatting is not lost.
The above automation requirement is part of my flow. Though I am familiar with scripting, I have never worked on such requirement.
Will really appreciate your help.
Here is a solution using csv2odf that should get the result you want:
Create a spreadsheet template in Excel or OpenOffice with these specifications:
Insert column titles with the same number of columns as the csv. (If you want to use titles from the csv file, add the -H option to the command below.)
Add one sample row of data. Use dummy numbers where numbers will go and dummy text where text will go. Format the text/numbers however you want, including conditional formatting to make negative numbers red.
Save the template as xlsx or ods (xls will not work).
Run this command:
csv2odf yourdata.csv yourtemplate.xlsx output.xlsx
Your data will be inserted into the template and the formatting will be duplicated on each row.

Using Excel Macros in both XLS and XLSX

How can i use the same macro in both the XLS and XLSX formats?
Is there anyhthing to be added in the XLSX format. i have written a small macro in XLSX (it has last column XFD) i want to use it in the XLS (it has last column as IV) .Is there anything to be changed?
This question is not about converting the file formats.
XLSX provides a broader set of formulas and also VBA functionality. Additionally, XLSX expands the row/column restriction that exists before Excel 2007 (from 256 columns to 16,384).
If your macros are written using up to column 16,384 (XFD), you're going to have to perform the calculations in chunks to make them fit within the 256 column (IV) restriction of Excel 2003. If you're using variables and not writing everything to a sheet, then there should be no problem (barring running out of memory).
Without more detail, it's difficult to tell whether you're using a set of functions from Excel 2007 that may not be supported in Excel 2003.
Which format was it written first? normally it should work in both formats of excel. As you are referring to last cell of both formats, it seems to have a code level issue than a version lavel.

Excel and Tab Delimited Files Question

I am encountering what I believe to be a strange issue with Excel (in this case, Excel 2007, but maybe also Excel 2003, but don't have access to it as I write this).
I can reliably convert some server data over into a tab-delimited format (been doing this for years) and then open it using Excel - no issue.
However, what seems to be happening is if I have an html <table> inside one of the fields, it looks like Excel 2007 thinks it should be converting the table into rows and columns inside Excel (not what I want). As you might imagine, this throws off the entire spreadsheet.
So question is, is there any way to set up excel to NOT do this (perhaps some setting in Excel that pertains to reading tab delimited files), or am I missing something?
Thanks.
Save your file as .txt
Now open the file in excel using Drag and Drop (rather than double clicking your hookey .xls)
Slightly more work to open the file, but your tab text formatting will now be respected.
When you open the tab-delimited file, you are shown an import mapping dialog that lets you pick each columns' data type (date, text, currency, etc.). For the columns that have HTML data present, choose text. This will tell it basically to import as-is and not try to automatically parse the data into a derived format.
Excel 2003 does the same. I don't think there is a way to do it with a config because Excel finds delimiters in the html table and breaks the html in cells and columns as it does for the other columns.
If the column containing html is always the same, you can use JYelton suggestion of renaming the file as csv and record a small VBA macro to load the file selecting automatically the html column as text in the import mapping dialog and you load the file calling the macro instead of double-clicking on the file.
If nothing else, import it into OpenOffice.org Calc, save as an .xls file, then open in Excel.

Resources