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

Can't install Excelize #2006

Closed
LionelPerret opened this issue Oct 7, 2024 · 5 comments
Closed

Can't install Excelize #2006

LionelPerret opened this issue Oct 7, 2024 · 5 comments
Labels
duplicate This issue or pull request already exists

Comments

@LionelPerret
Copy link

Description

I'm working in the VS Code Terminal on Windows and I'm trying to install excelize

go get github.com/xuri/excelize
doesn't work ('go get' is no longer supported outside a module.) and I need to do :
go install github.com/xuri/excelize@latest
instead

go install github.com/xuri/excelize@latest
I have the issue :
version constraints conflict:
github.com/360EntSecGroup-Skylar/excelize/v2@v2.8.1: parsing go.mod:
module declares its path as: github.com/xuri/excelize/v2
but was required as: github.com/360EntSecGroup-Skylar/excelize/v2

Thanks for your help!
Describe the results you received:
Error
Describe the results you expected:
Install ok
Output of go version:
go: github.com/xuri/excelize@latest: version constraints conflict:
github.com/xuri/excelize@v1.4.1: parsing go.mod:
module declares its path as: github.com/360EntSecGroup-Skylar/excelize
but was required as: github.com/xuri/excelize

go: github.com/xuri/excelize@latest: version constraints conflict:
        github.com/xuri/excelize@v1.4.1: parsing go.mod:
        module declares its path as: github.com/360EntSecGroup-Skylar/excelize
                but was required as: github.com/xuri/excelize

Excelize version or commit ID:

(paste here)

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

@xuri
Copy link
Member

xuri commented Oct 7, 2024

Thanks for your issue. Please read the README or documentation. Install lasted version by the following command:

go get github.com/xuri/excelize/v2

@xuri
Copy link
Member

xuri commented Oct 8, 2024

I closed this, if you have any questions, please let me know, and you can reopen this anytime.

@xuri xuri closed this as completed Oct 8, 2024
@xuri xuri added the duplicate This issue or pull request already exists label Oct 8, 2024
@LionelPerret
Copy link
Author

go get github.com/xuri/excelize/v2 doesn't work on VS Code :
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install example.com/cmd@latest'

That is why I used : go install github.com/xuri/excelize/v2
'go install' requires a version when current directory is not in a module
Try 'go install github.com/xuri/excelize/v2@latest' to install the latest version

So I tried : go install github.com/xuri/excelize/v2@latest
go: downloading github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
go: downloading github.com/richardlehane/mscfb v1.0.4
go: downloading github.com/xuri/efp v0.0.0-20231025114914-d1ff6096ae53
go: downloading github.com/xuri/nfp v0.0.0-20230919160717-d98342af3f05
go: downloading golang.org/x/crypto v0.19.0
go: downloading golang.org/x/net v0.21.0
go: downloading golang.org/x/text v0.14.0
go: downloading github.com/richardlehane/msoleps v1.0.3
package github.com/xuri/excelize/v2 is not a main package

Thanks !

@xuri
Copy link
Member

xuri commented Oct 8, 2024

Please reference the documentation, there is a video tutorial in the documentation for setting up Excelize project in the Visual Studio Code.

@LionelPerret
Copy link
Author

Ok Thank you very much !
go mod tidy
solved it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants