I'm using AODL to export some values from my app to an opendopcument spreadsheet.
I create a mster sheet with calc, write in the title, formatting some cells (border, alignment...) and save it.
in my app i have some code to open the file, that work. then i have a cycle to write some values in the loaded sheet
I post here some code: ----------------------------------------------------------- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbDati.Click
Dim Inizio As New Date(dtpInizio.Value.Year, dtpInizio.Value.Month, dtpInizio.Value.Day - 1)
Dim gg As Integer Dim strQuery As String
'foglio della base Dim foglio As New SpreadsheetDocuments.SpreadsheetDocument foglio.Load(SelFile) 'paragrafi Dim parag As AODL.Document.Content.Text.Paragraph
'cicla tutti i giorni For gg = 0 To 4 'aggiungo un giorno ogni volta Inizio = Inizio.AddDays(1)
dim VALUE as new string ("some text")
'creo i paragrafi parag = Content.Text.ParagraphBuilder.CreateSpreadsheetParagraph(foglio)
Dim testo As New AODL.Document.Content.Text.FormatedText(foglio, "testo01", VALUE) parag.TextContent.Add(testo)
'esporto i valori nel foglio foglio.TableCollection(0).RowCollection(5 + (3 * gg)).CellCollection(2).Content.Add(parag)
Next
'salvo il file foglio.SaveTo(SelFile)
End Sub ------------------------------------------------------------
comments are in italian... sorry. It is a very simple code writing a paragraph in a cell.
the problem is that AODL give an error on foglio.TableCollection(0).RowCollection(5 + (3 * gg)).CellCollection(2).Content.Add(parag)
saying that cell index is too high. i get the cellcollection.count and it is 3... very bad as in my sheet, in that row, i have 6 cell with border and formatting options....
any help would be appreciated
Giovanni
P.S. sorry for my bad english =))
The administrator has disabled public write access.