Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
There are scenarios where you might need to add, update, or manipulate TextBox objects within an Excel worksheet. This can be useful for adding annotations, guiding text, or any supplementary information that assists in data presentation. Aspose.Cells for Node.js via C++ provides robust functionality to manage TextBox objects in Excel documents.
This example shows how to:
const Cells = require("aspose.cells"); // Ensure you have linked the Aspose.Cells library correctly
// Create a new workbook
let workbook = new Cells.Workbook();
// Access the first worksheet
let worksheet = workbook.getWorksheets().get(0);
// Adding a TextBox shape
let textBox = worksheet.getShapes().addTextBox(2, 2, 100, 100);
// Set TextBox properties
textBox.setText("This is a TextBox.");
textBox.setFontSize(12);
textBox.setFillColor(Cells.Color.fromArgb(255, 255, 255)); // White background
// Save the workbook
workbook.save("TextBoxExample.xlsx");
This code demonstrates how to create and configure a TextBox within an Excel worksheet, showing how to adjust its size, position, and format it according to your requirements.
Keep in mind that interactions with text boxes may vary based on specific use cases, so refer to the Aspose.Cells for Node.js via C++ documentation for additional methods and properties.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.