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

i have some pictures in the excel, but when I use the GetPictures() method to get them,some of resulet is null,why? #1585

Closed
zhanqixuan opened this issue Jul 21, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@zhanqixuan
Copy link

zhanqixuan commented Jul 21, 2023

Description

Steps to reproduce the issue:
i have some pictures in the excel, but when I use the GetPictures() method to get them,some of resulet is null
Describe the results you received:
some of the pics is null
Describe the results you expected:
all of them should not be null
Output of go version:

1.20.6

Excelize version or commit ID:

v2.7.1

Environment details (OS, Microsoft Excel™ version, physical, etc.):
WINDOWS

@xuri
Copy link
Member

xuri commented Jul 24, 2023

Thanks for your feedback. Could you show us a complete, standalone example program or reproducible demo?

@xuri xuri added the needs more info This issue can't reproduce, need more info label Jul 24, 2023
@xuri
Copy link
Member

xuri commented Jul 26, 2023

It seems still not have enough info of code and attachments to reproduce this issue, so I'll close this issue, if you have any questions, please let me know to reopen this anytime.

@xuri xuri closed this as completed Jul 26, 2023
@ihater
Copy link

ihater commented Aug 7, 2023

I also have a similar problem, I don't know where is the problem:

I don't know if it's a problem with the excel format or a problem with the code

go version:

1.17.13

Excelize version ID:

v2.7.1

demo:

	reader, err := excelize.OpenReader(file)
	rows, err := reader.GetRows("sheet1")
	picCellCos := []string{"F", "G", "H"}

	for index, row := range rows {
		if index == 0 {
			continue
		}

		// the text in the cell
		id := row[0]

		for _, cos := range picCellCos {
			// but some pics is nil 
			pics, picerr := reader.GetPictures("sheet1", cos+conv.ToString(index+1))
			if picerr == nil {
				for _, pic := range pics {
					picByte := bytes.NewReader(pic.File)
				
					// do something
	
				}
			}
		}
	}

Please tell me where I did wrong, thank you ~~

Here is my test data
testupload.xlsx

@xuri xuri added bug Something isn't working in progress Working in progress and removed needs more info This issue can't reproduce, need more info labels Aug 8, 2023
xuri added a commit that referenced this issue Aug 8, 2023
…date and time number format

- Support apply date and time number format with 16 languages: Persian, Polish, Portuguese, Punjabi, Quechua, Romanian, Romansh, Sakha, Sami, Sanskrit, Scottish Gaelic, Serbian, Sesotho sa Leboa, Setswana, Sindhi, Sinhala and Slovak
- Update the unit test and dependencies modules
@xuri
Copy link
Member

xuri commented Aug 8, 2023

Hi @ihater, thanks for your feedback. I have fixed this issue, please try to upgrade the master branch code, and this patch will be released in the next version.

@xuri xuri removed the in progress Working in progress label Aug 8, 2023
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
…prove date and time number format

- Support apply date and time number format with 16 languages: Persian, Polish, Portuguese, Punjabi, Quechua, Romanian, Romansh, Sakha, Sami, Sanskrit, Scottish Gaelic, Serbian, Sesotho sa Leboa, Setswana, Sindhi, Sinhala and Slovak
- Update the unit test and dependencies modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants