Closed mwtupper closed 2 years ago
@mwtupper
Unfortunately, your requirement is not clear enough. Please share some more detail about your requirement along with Aspose APIs that you are using. Please also share your sample input and expected output documents. We will then provide you more information about your query.
I want to create a table with 2 columns and 7 rows. The first row will be the header with bold text. the next 6 rows will be attributes with the blue test for the attribute name in the first column and the attribute text in the second column.
@mwtupper
It would be great if you please share the file format in which you want to save your final output e.g. Word format DOCX.
Sorry I wasn't clear. I want to create a DOCX file.
@mwtupper
You can use Aspose.Words for .NET with following code example to achieve your requirement. For more detail, please read the following article. Working With Tables
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// We call this method to start building the table.
builder.StartTable();
builder.RowFormat.HeadingFormat = true;
builder.Font.Bold = true;
builder.InsertCell();
builder.Write("Row 1, Cell 1 Content.");
// Build the second cell
builder.InsertCell();
builder.Write("Row 1, Cell 2 Content.");
// Call the following method to end the row and start a new row.
builder.EndRow();
builder.RowFormat.HeadingFormat = false;
builder.Font.Bold = false;
builder.Font.Color = Color.Blue;
// Build the first cell of the second row.
builder.InsertCell();
builder.Write("Row 2, Cell 1 Content");
builder.Font.Color = Color.Black;
// Build the second cell.
builder.InsertCell();
builder.Write("Row 2, Cell 2 Content.");
builder.EndRow();
builder.Font.Color = Color.Blue;
// Build the first cell of the second row.
builder.InsertCell();
builder.Write("Row 3, Cell 1 Content");
builder.Font.Color = Color.Black;
// Build the second cell.
builder.InsertCell();
builder.Write("Row 3, Cell 2 Content.");
builder.EndRow();
// Signal that we have finished building the table.
builder.EndTable();
// Save the document to disk.
doc.Save(MyDir + "output.docx");
I am really sorry for not adding al the information. I am developing in C++ (Visual Studio 2017) x64. I was going to convert the .NET example but I don't see the DocumentBuilder in the DuckX or the pugixml dlls. is there another dll that I need to download?
Windows 10
@mwtupper
Please read following article about working with table using C++. Working with Tables
We suggest you please post your query in our official fee support forum to get the accurate response.
That takes me top Apose/$1200 purchase. I thought DuckX would be able to create a table? That's the support i thought I was asking. I just have a simple use probably only one time.
There is a tables method in DuckX how do I use that?
@mwtupper
Please refer to this forum thread for your query.
There is a tables method in DuckX how do I use that? That is what I would like a example for,
@mwtupper
To create the table and format text using Aspose.Words for C++, please read the following articles. Introduction and Creating Tables Applying Formatting
If you have more queries related to Aspose.Words for C++, please post your query in our official fee support forum.
I am currently create a text file with the sample below: Category Description Type: Alarm Message ID: A0 Equipment/Application: Shared Message Text: Invalid position to send SV command Fault Code Description: The current MCT position is not allowed to send commands to the vehicle Corrective Action: 1. Join the MCT using the appropriate position
I download the DuckX and created x 64 bit Duckx.lib and have sample.cpp working.
What I want is a example that creates a table like the attachment.
Thank you in advance for any help you can provide.