|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
I'm using an XML header to create a microsoft excel spreadsheet based on an SQL database. It works, but I want to know if there is a way I can implement conditional formatting and other functions. I'm also kind of new at this so any XML to Excel Spreadsheets websites would be helpful. Here's the code I have so far but the formatting part doesn't work:
<xml> <html xmlns ="urn:schemas-microsoft-com ffice ffice"xmlns:x="urn:schemas-microsoft-com ffice:excel"xmlns="http://www.w3.org/TR/REC-html40"> <x:ExcelWorkbook> <x:ExcelWorksheets> <x:ExcelWorksheet> <x:Name>Ryan Spreadsheet</x:Name> <x:WorksheetOptions> <x:ConditionalFormatting> <x:Range>R1:R65550</x:Range> <x:Condition> <x:Formula>=MOD(ROW(),2)=0</x:Formula> <x:Format Style='background:#CCCCFF;mso-pattern:none'/> <x:/Condition> <x:/ConditionalFormatting> <x:Selected/> </x:WorksheetOptions> </x:ExcelWorksheet> </x:ExcelWorksheets> <style> <!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";} @page {mso-header-data:&A; mso-footer-data:"Page &P"; margin:1.0in .75in 1.0in .75in; mso-header-margin:.5in; mso-footer-margin:.5in;} tr {mso-height-source:auto;} .xheader {background:#CCCCCC;mso-pattern:none; font-weight:900;} col {mso-width-source:auto;} br {mso-data-placement:same-cell;} .style0 {mso-number-format:General; text-align:general; vertical-align:bottom; white-space:nowrap; mso-rotate:0; mso-background-source:auto; mso-pattern:auto; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; border:none; mso-protection:locked visible; mso-style-name:Normal; mso-style-id:0;} td {mso-style-parent:style0; padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore adding;color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;} --> </style> </head> Thanks in advance, Ryan </x:ExcelWorkbook> </xml> But it doesn't work |
|
#2
|
||||
|
||||
|
Straight from the horse's mouth
at The Microsoft Office site there is a great reference list of all the supported features and an example using SQL as the source which can obviously be easily adapted to any source.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Using XML to create Excel Spreadsheets |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|