In my application i am storing the data from richtextbox in which user has the facility to store formatted data into the database. ie. we store
tags with the data. now user can export the report into wordfile(which is in tabular form) .with formatting .
my problem is i am again reading the word file report using aspose and compare the data stored in the database and in the word file. if data is changed application inserts the updated record.but when i pick the data from the word file i am not able to pick the formatting so its considered as modified(which is not actually).eg. when i compare two string faraz and
faraz its condidered as different.
please can you help me . if it is possible to pick the text with formatting.
i am using vb.net (2005)
Sorry, I don’t fully understand what you are trying to do. Can you please explain how do you use (or want to use Aspose.Words) and what does it do right or wrong for you.
i am using aspose.words to pick the data saved in ms word table(rows and columns) and store it in sql server database. word data is formatted i.e we have used Bolditalics underline** in the word file.
how can i save the text with formatting into the database.
this is how i am picking the data.
Document doc = new Document(@"333_101395_faraz\in.doc");
Table table = doc.FirstSection.Body.Tables[0];
DataTable dt = GetDataTable(table);
///
/// convert word table into Datatable
///
///
/// DataTable
public DataTable GetDataTable(Table table)
{
DataTable dt = new DataTable();
char[] escArr = { '\a' };
foreach (Cell cell in table.FirstRow.Cells)
{
dt.Columns.Add(cell.Range.Text.Trim(escArr));
}
for (int i = 1; i < table.Rows.Count; i++)
{
DataRow row = dt.NewRow();
for (int j = 0; j < table.Rows[i].Cells.Count; j++)
{
row[j] = table.Rows[i].Cells[j].Range.Text.Trim(escArr);
}
dt.Rows.Add(row);
}
return dt;
}