Skip to content

Commit

Permalink
fix a bug of new xlsx
Browse files Browse the repository at this point in the history
  • Loading branch information
00331594 committed Mar 5, 2024
1 parent 2e73d03 commit dd11791
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
*.zip
*.xlsx
/test
!/resource/new.xlsx
!/resources/new.xlsx
#*.bat
/examples/demo.rs
File renamed without changes.
5 changes: 3 additions & 2 deletions src/api/workbook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ impl Workbook {

impl Workbook {
pub fn new() -> Workbook {
let mut wb = Self::from_path("resource/new.xlsx").unwrap();
wb.file_path = String::from("./new.xlsx");
let file_path = concat!(env!("CARGO_MANIFEST_DIR"), "/resources/new.xlsx");
let mut wb = Self::from_path(file_path).unwrap();
wb.file_path = String::from(file_path);
wb
}

Expand Down

0 comments on commit dd11791

Please sign in to comment.