Answer the question
In order to leave comments, you need to log in
Competent formation of xls reports - how?
The task is to automate the process of generating Excel'evskih reports on pearl.
The Excel::Template module was chosen as the most suitable option, which allows you to generate an xls document based on an xml template, which of course is very convenient.
But. The generated book turns out to be outrageously disgusting - because the handler refuses to accept any style settings specified in the xml file.
If you use Spreadsheet, then in principle you can set some design parameters, if I understand correctly. But Excel::Template simply populates the specified cell with the value from the variable.
How can I bring the resulting book into a neat formatted form?
Answer the question
In order to leave comments, you need to log in
Have you tried this way: first prepare beautiful empty files (xls), and then open, fill in with numbers, close?.. As long as you don't touch the styles :)
Try to save the code below as html and open it in excel.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1251">
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.3 (Win32)">
<META NAME="AUTHOR" CONTENT="Сергей Зыкин">
<META NAME="CREATED" CONTENT="20120720;16122583">
<META NAME="CHANGED" CONTENT="0;0">
<STYLE>
<!--
BODY,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Arial"; font-size:x-small }
-->
</STYLE>
</HEAD>
<BODY TEXT="#000000">
<TABLE FRAME=VOID CELLSPACING=0 COLS=3 RULES=NONE BORDER=0>
<COLGROUP><COL WIDTH=86><COL WIDTH=86><COL WIDTH=86></COLGROUP>
<TBODY>
<TR>
<TD WIDTH=86 HEIGHT=17 ALIGN=RIGHT SDVAL="1" SDNUM="1049;"><B>1</B></TD>
<TD WIDTH=86 ALIGN=RIGHT SDVAL="2" SDNUM="1049;"><I>2</I></TD>
<TD WIDTH=86 ALIGN=RIGHT SDVAL="3" SDNUM="1049;"><U>3</U></TD>
</TR>
<TR>
<TD HEIGHT=17 ALIGN=RIGHT BGCOLOR="#00FFFF" SDVAL="4" SDNUM="1049;">4</TD>
<TD ALIGN=RIGHT SDVAL="5" SDNUM="1049;"><FONT COLOR="#FF0000">5</FONT></TD>
<TD STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN=RIGHT SDVAL="6" SDNUM="1049;">6</TD>
</TR>
<TR>
<TD HEIGHT=17 ALIGN=RIGHT SDVAL="7" SDNUM="1049;"><FONT COLOR="#00FF00">7</FONT></TD>
<TD ALIGN=RIGHT SDVAL="8" SDNUM="1049;">8</TD>
<TD ALIGN=RIGHT SDVAL="9" SDNUM="1049;">9</TD>
</TR>
</TBODY>
</TABLE>
<!-- ************************************************************************** -->
</BODY>
</HTML>
IMHO, it's easier to generate a page that Excel will read (by the way, it can be uploaded as a *.xls file) than to peel data into a table.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question