Skip to content

Commit

Permalink
📝 Update some examples
Browse files Browse the repository at this point in the history
  • Loading branch information
00331594 committed Apr 7, 2024
1 parent abc13a7 commit e49fc8e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
8 changes: 0 additions & 8 deletions examples/comments.rs

This file was deleted.

4 changes: 4 additions & 0 deletions examples/defined_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ fn main() -> WorkbookResult<()> {
worksheet.write("A1", "This worksheet contains some defined names.")?;
worksheet.write("B1", "Show defined name Sales on the right->")?;
worksheet.write_formula("C1", "=Sales")?;
// In older versions of Excel, you could use the write_old_formula method:
// worksheet.write_old_formula("C1", "=Sales")?;
worksheet.write("A2", "See Formulas -> Name Manager above.")?;
worksheet.write("A3", "Example formula in cell B3 ->")?;
worksheet.write_formula("B3", "=Exchange_rate")?;
// In older versions of Excel, you could use the write_old_formula method:
// worksheet.write_old_formula("B3", "=Exchange_rate")?;
worksheet.write("F1", "Fill in some arrays on the right->")?;
worksheet.write_column("G1", sales.iter())?;
worksheet.write_column("H1", units.iter())?;
Expand Down
3 changes: 3 additions & 0 deletions examples/ignore_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ fn main() -> WorkbookResult<()> {
// Write a divide by zero formula. This will also cause an Excel warning.
worksheet.write_formula("C5", "=1/0")?;
worksheet.write_formula("C6", "=1/0")?;
// In older versions of Excel, you could use the write_old_formula method:
// worksheet.write_old_formula("C5", "=1/0")?;
// worksheet.write_old_formula("C6", "=1/0")?;

// Turn off some of the warnings:
let mut error_map = HashMap::new();
Expand Down

0 comments on commit e49fc8e

Please sign in to comment.