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

image error with 1.3.2 #168

Open
smolleyes opened this issue Aug 26, 2022 · 12 comments
Open

image error with 1.3.2 #168

smolleyes opened this issue Aug 26, 2022 · 12 comments

Comments

@smolleyes
Copy link

hi

i have this error with 1.3.2 and can t get any image working with any other version :(

TypeError: Cannot read properties of null (reading 'asText') 1|extranet-api | 2022-08-26 15:23 +02:00: at Workbook.module.exports.Workbook.loadDrawing (/home/srv/websites/batexpert-api/node_modules/xlsx-template/lib/index.js:592:77)

someone have success adding images with this module ?

thanks

@smolleyes
Copy link
Author

hi

someone still maintaining this module ?

thanks

@Eraledm
Copy link

Eraledm commented Nov 19, 2022

Same issue here

@Eraledm
Copy link

Eraledm commented Nov 19, 2022

I forked the repo and it looks like tests are working correctly so I tested with my own xlsx file and turns out an embedded image was breaking this feature:
Screen Shot 2022-11-18 at 10 34 52 p m
I haven't had time to check the code and figure out what's the real issue, I tested removing that image and adding other png images and it works as expected, so my current solution was just remove that image and add another one.

Hope it helps

@kant2002
Copy link
Collaborator

If somebody have file and short sample of code that may help troubleshoot an issue

@Eraledm
Copy link

Eraledm commented Nov 19, 2022

Sure,
test-insert-images.xlsx
The original excel was from a client, I modified it to keep the same format of the testing files so you can delete the image object and validate that the tests passes but if you keep the image then the tests fails

@kant2002
Copy link
Collaborator

@Eraledm can you take a look at release 1.4.0 and I was not able to repro an issue. Maybe you can create some small repro app ?

@smolleyes
Copy link
Author

hi!

in my case it seems that the checkbox are creating the problem... if i remove them everything works... for information

@kant2002
Copy link
Collaborator

@smolleyes do you experience this error with 1.4.0 too?

@smolleyes
Copy link
Author

with the "bad" excel yes

@kant2002
Copy link
Collaborator

@smolleyes can you give me test file similar to wha Eraledm provide which trigger this behaviour?

@interrizky
Copy link

Upgrade it to 1.4.3 version and still having the issue. Have tried using buffer, base64 and path too. It says:

TypeError: Cannot read properties of null (reading 'asText') at Workbook.loadDrawing (../node_modules/xlsx-template/lib/index.js:517:77)

@jdugh
Copy link
Contributor

jdugh commented Feb 7, 2024

@smolleyes , @interrizky @Eraledm :
Can you provide a simple template, with the image and a simple source script to reproduce your problem?
We use this module daily and the image insertion works fine for us.

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

5 participants