When I open a new Excel workbook, the look is shown as this picture.
I press "Ctrl+A" and change the font size to 30, and the look is shown as this picture.
I try to reproduce this behavior with Aspose Cells. The source code is shown below.
My first question is that the "attempt 1" line does not work. The look is shown as this picture. I wonder whether this is bug ?
My second question is that the "attempt 2" block does not work exactly. The look is shown as this picture. Note that the labels are also enlarged, different from the EXCEL situation.
My third question is whether there is, or will there be, a "DefaultStyle" for Worksheet ?
using System.IO;
using Aspose.Cells;
public class Program
{
public static void Main(string[] args)
{
Workbook workbook = new Workbook();
// attempt 1
// workbook.DefaultStyle.Font.Size = 30;
// attempt 2
Style defaultStyle = workbook.DefaultStyle;
defaultStyle.Font.Size = 30;
workbook.DefaultStyle = defaultStyle;
Worksheet worksheet = workbook.Worksheets[0];
Cell cell = worksheet.Cells["A1"];
cell.PutValue("Visit Aspose!");
workbook.Save("book1.xls");
}
}