UPDATE: Adds 'user model' API (#27)

* bump version for documentation
* Fixes wrong doc comment
* renames old APIs to be consistent
This commit is contained in:
Nicolás Hatcher Andrés
2024-04-03 22:41:15 +02:00
committed by GitHub
parent e9fc41541b
commit d445553d85
45 changed files with 3233 additions and 268 deletions

View File

@@ -1,4 +1,4 @@
use ironcalc::{base::model::Model, export::save_to_xlsx};
use ironcalc::{base::Model, export::save_to_xlsx};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut model = Model::new_empty("widths-and-heights", "en", "UTC")?;
@@ -6,7 +6,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let (sheet, row, column) = (0, 5, 3);
// Make the first column 4 times as width
let worksheet = model.workbook.worksheet_mut(sheet)?;
let column_width = worksheet.column_width(column)? * 4.0;
let column_width = worksheet.get_column_width(column)? * 4.0;
worksheet.set_column_width(column, column_width)?;
// and the first row twice as high.