i am using a php script to generate excel xml. everything works fine as long as the datatype is "String", but nothing quite works right when i switch the datatype to "DateTime". the best i can get is to show a decimal value in the fields i have set to "DateTime", not the standard user-friendly excel display (eg "10:39:00") . i also am trying to write simple formulas to subtract time but have not had any success. the exported excel is useless without these two features and is not any better than a simple tab delimited text file. the whole point of the file is so that someone can view the results online, download the file as an excel spreadsheet, make changes to the data and have the formulas update the totals accordingly. playing with the DateTime format leaves my code looking something like this:
i would really like it to just display the time but the excel xml crashes every time i try to make the datatype "Time".
my first crack at the formula looks something like this:
but i have a sneaking suspicion i'm going about that all wrong. i've been hunting down tutorials all afternoon and can't seem to find a concise answer to my two problems. any help would be greatly appreciated. i can go into more detail or give further examples if needed. thanks in advance.
Code:
$tmp = '2007-11-01T12:31:00.000';
$xml .= ' <ss:Cell>
<ss:Data ss:Type="DateTime">'.$tmp.'</ss:Data>
</ss:Cell>'."\n";
my first crack at the formula looks something like this:
Code:
<Cell ss:Formula="=ABS(C4-C3)+ABS(C2-C1)"/>
Comment