OpenDocument4all - Info and tools about OpenDocument
Saturday, 19 May 2012
Home arrow Forum
Forum Statistics
Total user: 91
Total message: 181
Main Menu
Home
My Blog
AODL - Project
AODC - Project
OO Development & Info
Forum
About OpenDocument ...
Search
News
Contact Us
Login Form





Lost Password?
No account yet? Register
Sourceforge.net

SourceForge.net - Goto the project homepage
Project site on SF.net

 

Demand OpenDocument

 

Countomat Webcounter und Webstatistik (Statistik & Logfileanalyse, Counter)

OpenDocument4all-Forum

 
Problem with table.InsertCellAt()
Date: 2007/02/02 01:15 By: Steffen Status: User  
Karma: 0  
Fresh Boarder

Posts: 3
graphgraph
Hi,

i tried to read ods-files with AODL and everything went fine. Now i try to create a table and the result is dissappointing. I used one of the examples an extended it a bit:

Code:

  SpreadsheetDocument sd    = new SpreadsheetDocument(); sd.New(); Table table = new Table(sd"First""tablefirst"); int rc 0; while (reader.Read()) {     for (int i 0reader.FieldCounti++)     {         Cell cell table.CreateCell();         Paragraph p ParagraphBuilder.CreateSpreadsheetParagraph(sd);         FormatedText fText;         string tok "(" rc.ToString() + "/" i.ToString() + ")";         fText.TextStyle.TextProperties.Underline LineStyles.dotted;         paragraph.TextContent.Add(fText);         cell.Content.Add(paragraph);         table.InsertCellAt(rc 1cell);         }     rc ++; } sd.TableCollection.Add(table); sd.SaveTo("c:formated.ods");



So, basically i use a MYSQLReader and for each row i get i add the data field by field to the table. Since the output is hard to describe, i attached the result-file. Each cell has the (row(column)-pair attached, which i passed to InsertCellAt. Any hints?

Thx in advance
File Attachment:
File name: formated.zip
File size:10124 bytes


Post edited by: Peppie, at: 2007/02/02 01:16
The administrator has disabled public write access.

Re:Problem with table.InsertCellAt()
Date: 2007/02/02 02:22 By: Lars B Status: Admin  
Karma: 1  
Admin

Posts: 33
graph
Hi,

I have just looked at the posted file. Your code is correct,
but the result isn't as expected since there is a bug inside the auto resize
algorithm for rows and cells I just started to fix this. Sorry.

Regards
Lars
The administrator has disabled public write access.

Re:Problem with table.InsertCellAt()
Date: 2007/02/02 14:50 By: Lars B Status: Admin  
Karma: 1  
Admin

Posts: 33
graph
Hi,

I have fixed the bug last evening and this evening I will upload
a bugfix release to the projects download page.

Regards
Lars
The administrator has disabled public write access.

Re:Problem with table.InsertCellAt()
Date: 2007/02/02 17:25 By: Steffen Status: User  
Karma: 0  
Fresh Boarder

Posts: 3
graphgraph
Thanks Lars, you're da man
The administrator has disabled public write access.

Re:Problem with table.InsertCellAt()
Date: 2007/02/05 07:02 By: Lars B Status: Admin  
Karma: 1  
Admin

Posts: 33
graph
Hi,

since there are some outstanding changes for AODL, I haven't uploaded a new
public version, but you can do an anonymous cvs checkout of the latest version.
The bug you found is fixed within this. The upcoming release will be uploaded
together with the first preview release of the PDF exporter. I hope this will be the
case within this week.

Regards
Lars
The administrator has disabled public write access.

Re:Problem with table.InsertCellAt()
Date: 2007/02/06 23:54 By: Steffen Status: User  
Karma: 0  
Fresh Boarder

Posts: 3
graphgraph
works!
The administrator has disabled public write access.

Quick jump
Download area
Who's Online
We have 24 guests online
Polls
Should AODL and AODC also implement export as PDF and RTF?
 
Popular
© 2005 MamboZ. All rights reserved.