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 = 0; i < reader.FieldCount; i++)
{
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 + 1, i + 1 , cell);
}
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?
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
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
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
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
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
works!
The administrator has disabled public write access.