exceljs
/
exceljs
Public
- Notifications
- Fork 1.7k
-
Star 13k
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.
Sign up for GitHub
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
Jump to bottom
How to extract Image from Excel #1962
Closed
HuoXiaoYe opened this issue
Jan 27, 2022
· 5 comments
Closed
How to extract Image from Excel #1962
HuoXiaoYe opened this issue
Jan 27, 2022
· 5 comments
Comments
Contributor
skypesky
commented
Feb 1, 2022
•
edited
edited
@HuoXiaoYe 假设图片在单元格A1,想要获得图片的信息,示例代码如下:const cell = worksheet.getCell('A1'); 如果你想获取某个worksheet下所有的图片,示例代码如下:const images: Array<{
type: 'image',
imageId: string;
range: ImageRange;
}> = worksheet.getImages();
for (const image of images) {
const img: Image = workbook.getImage(+image.imageId);
} |
Author
HuoXiaoYe
commented
Feb 10, 2022
@skypesky 同学你好,我发现用getCell('A1')这种方法获取的是一个空值,即便A1单元格是有一张图片的。 |
Author
HuoXiaoYe
commented
Feb 10, 2022
@skypesky worksheet.getImages();这种方式我可以获取到一个sheet中的所有图片,但是imageID 和我在sheet中出现的顺序是对应不上的。所以貌似也不太行😂 |
Contributor
skypesky
commented
Feb 10, 2022
@HuoXiaoYe 你做测试的excel可以提供一下吗? |
Contributor
skypesky
commented
Feb 10, 2022
@HuoXiaoYe |
HuoXiaoYe
closed this as completed
Feb 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
2 participants
this is my Excel data:
I want to extract images from the Excel. But I read undefind.
I want to know how to extract images from Excel, thank you.
The text was updated successfully, but these errors were encountered: