Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for additional information.
1. I think that I have found workaround for you. Please try using EMF picture format. For example try using the following simple code and you will see difference between images in the generated document.
//Create a sample chart.
Aspose.Chart.Chart lineChart = new Aspose.Chart.Chart();
lineChart.Height = 300;
lineChart.Width = 400;
Aspose.Chart.Series lineSeries = new Aspose.Chart.Series();
lineSeries.ChartType = Aspose.Chart.ChartType.Line;
lineSeries.Name = "Series";
lineSeries.DataPoints.Add(new Aspose.Chart.DataPoint(1, 1));
lineSeries.DataPoints.Add(new Aspose.Chart.DataPoint(2, 2));
lineSeries.DataPoints.Add(new Aspose.Chart.DataPoint(3, 3));
// Fill a series manually
lineChart.SeriesCollection.Add(lineSeries);
//Save chatr in EMF format
MemoryStream ms = new MemoryStream();
lineChart.Save(ms, ImageFormat.Emf);
//Create new document
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
//Insert chart using GetChartImage method
builder.InsertImage(lineChart.GetChartImage());
//Insert chart as EMF
builder.InsertImage(ms);
//Save document
doc.Save(@"Test068\out.doc");
2. Maybe you can achieve this without using tables. Please see he attached document and the following code.
DataTable atable = new DataTable();
atable.Columns.Add("col1");
atable.Columns.Add("col2");
atable.Columns.Add("col3");
DataRow row = atable.NewRow();
row[0] = "US$2.53";
row[1] = "£1.27";
row[2] = "€1.70";
atable.Rows.Add(row);
Document doc = new Document(@"Test063\in.doc");
DocumentBuilder builder = new DocumentBuilder(doc);
//Move to cell
builder.MoveToCell(0, 0, 1, 0);
builder.Font.Color = Color.Black;
for (int j = 0; j < atable.Columns.Count; j++)
{
//Insert value
builder.Write(row[j].ToString());
if (j != atable.Columns.Count - 1)
{
builder.Write(ControlChar.TabChar.ToString()); //Insert tab
}
}
doc.Save(@"Test063\out.doc");
I hope this could help you.
Best regards.