Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't find template file ...blank.xlsx error when creating a new file #250

Open
YongHee-Kim opened this issue Jan 19, 2024 · 2 comments

Comments

@YongHee-Kim
Copy link
Contributor

I've noticed that XLSX couldn't generate a new excel file
here is repro step

using XLSX 
f = XLSX.open_empty_template()

AssertionError: Couldn't find template file C:\Users\Ykim\.julia\artifacts\c0b84c4a80d13f58b3409f4a77d4a11455b5609e\blank.xlsx.
Stacktrace:
 [1] open_empty_template(sheetname::String; relocatable_data_path::String)
   @ XLSX C:\Users\Ykim\.julia\packages\XLSX\U2Bcm\src\write.jl:35
 [2] open_empty_template
   @ XLSX C:\Users\Ykim\.julia\packages\XLSX\U2Bcm\src\write.jl:29 [inlined]
 [3] open_empty_template()
   @ XLSX C:\Users\Ykim\.julia\packages\XLSX\U2Bcm\src\write.jl:29
 [4] top-level scope
   @ REPL[9]:1

I've looked into the artifact folder, but there is only sheet_template.html
image

I'm on Windows10 and only anti virus enabled on my machine is windows defender. Perhaps windows deletes .xlsx files downloaded by Julia's package manager?

@YongHee-Kim YongHee-Kim changed the title Couldn't find template file ...blank.xlsx Couldn't find template file ...blank.xlsx error when creating new file Jan 19, 2024
@YongHee-Kim YongHee-Kim changed the title Couldn't find template file ...blank.xlsx error when creating new file Couldn't find template file ...blank.xlsx error when creating a new file Jan 19, 2024
@felipenoris
Copy link
Owner

@YongHee-Kim which julia version are you using?

@YongHee-Kim
Copy link
Contributor Author

YongHee-Kim commented Jan 25, 2024

I'm on 1.10.0

Julia Version 1.10.0
Commit 3120989f39 (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 20 × 12th Gen Intel(R) Core(TM) i7-12700H
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, alderlake)
  Threads: 1 on 20 virtual cores

I did bit more investigation and I think what happened is that I've deleted "blank.xlsx" by accident, because XLSX.openxlsx isn't generating a new file but it just points to `blank.xlsx'

julia> @__DIR__
"C:\\Users\\Ykim"

# it doesn't create a new file
julia> xf = XLSX.openxlsx(joinpath(@__DIR__, "foo.xlsx"), mode="w")
XLSXFile("C:\Users\Ykim\.julia\artifacts\c0b84c4a80d13f58b3409f4a77d4a11455b5609e\blank.xlsx") containing 1 Worksheet
           sheetname size          range
-------------------------------------------------
              Sheet1 1x1           A1:A1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants