SID-00761: Exporting dynamic table to Excel
| Status: |
Answered |
TWiki version: |
4.2.3 |
Perl version: |
5.010000 |
| Category: |
ExcelImportExportPlugin |
Server OS: |
Windows Server 2003 |
Last update: |
14 years ago |
I use the
ExcelImportExportPlugin.
I wonder if it is possible to export a dynamic table, e.g. the result of search to an Excel table.
Table2Excel does only work with a static table of the format:
|*header1* | *header2* |
| data | data |
What I'm looking for is to export the result of:
%SEARCH{"TestTopic*" web="Main" type="regex" header="| *header1* | *header2* |" format="| data | data |"}%
Is this possible at all?
Thank you in advance!
--
AndreasHeyden - 2010-02-22
Discussion and Answer
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
PeterThoeny - 2010-04-05
Peter,
I am having similar issues with trying to get the
ExcelImportExportPlugin to work, but am unable too. Is there any directions on how to enable or have a twiki page dynamically update with a Excel spreadsheet as to whenever the excel spreadsheet is updated, the Twiki page also gets updated?
--
AnthonyParagas - 2011-06-20
You can do that without the
ExcelImportExportPlugin by creating a topic that contains a SEARCH that outputs text in
CSV
(comma-separated values) format. This topic needs to be called with proper URL parameters so that you can save the file locally with proper file name and file type (MIME type).
Step 1: Create topic wth SEARCH: Let's call it ContactsAsCSV. Content:
<noautolink>
%SEARCH{
"form.name='ContactForm'"
excludetopic="ContactTemplate"
type="query"
nonoise="on"
format="$quot$formfield(First Name)$quot,$quot$formfield(Last Name)$quot,$quot$formfield(Address)$quot,$quot$formfield(City)$quot,$quot$formfield(State)$quot,$quot$formfield(ZIP)$quot"
}%
</noautolink>
You could do also a dynamic query where you add URLPARAM to refine the search.
Step 2: Create link to ContactsAsCSV with proper URL parameters:
[[%SCRIPTURL{view}%/%WEB%/ContactsAsCSV?skin=text;contenttype=text/csv%0Acontent-disposition%3A+attachment%3B+filename%3DContacts-%SERVERTIME{$year-$mo-$day}%.csv][Export contacts in Excel format]]
We point to the ContactsAsCSV topic and add several parameters, which are properly URL-encoded.
--
PeterThoeny - 2011-06-20
The
ContactDbAddOn now has an export to Excel feature.
--
PeterThoeny - 2011-06-22
See blog post on this topic,
How to Export TWiki Data in CSV Format for Use in Excel.
--
PeterThoeny - 2011-11-14
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.