Code Monkey home page Code Monkey logo

Comments (12)

tbaliance avatar tbaliance commented on July 25, 2024

@thxallvu Can you try the shorten-path-names branch and let me know if it solves your problem? If not, what is your GOPATH set to?

from unioffice.

thxallvu avatar thxallvu commented on July 25, 2024

Error information:
C:\GoWorks\src\baliance.com>go build baliance.com/gooxml/... go build baliance.com/gooxml/schema/schemas.openxmlformats.org/wordprocessingml: C:\Go\pkg\tool\windows_amd64\compile.exe: fork/exec C:\Go\pkg\ tool\windows_amd64\compile.exe: The filename or extension is too long. go build baliance.com/gooxml/schema/schemas.openxmlformats.org/spreadsheetml: C:\Go\pkg\tool\windows_amd64\compile.exe: fork/exec C:\Go\pkg\too l\windows_amd64\compile.exe: The filename or extension is too long.

my GOPATH set to “C:\GoWorks” Go ENV :
C:\Users\Administrator>go env set GOARCH=amd64 set GOBIN= set GOEXE=.exe set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=C:\GoWorks set GORACE= set GOROOT=C:\Go set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64 set GCCGO=gccgo set CC=gcc set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 set CXX=g++ set CGO_ENABLED=1 set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config

from unioffice.

tbaliance avatar tbaliance commented on July 25, 2024

@thxallvu Can you verify the fix?

from unioffice.

thxallvu avatar thxallvu commented on July 25, 2024

As you said,i verified the fix. And there is no compile Error.It generate the .docx file but cannot open . I could open the .docx file in the _example ,before i recompile all the files.

from unioffice.

tbaliance avatar tbaliance commented on July 25, 2024

@thxallvu Can you attach the doc file that you created and I'll have a look? I verified with Windows 10 and Office 365.

from unioffice.

thxallvu avatar thxallvu commented on July 25, 2024

tables.docx

from unioffice.

tbaliance avatar tbaliance commented on July 25, 2024

@thxallvu I can't reproduce the problem, the file you sent contains the exact same contents as the tables.docx that is checked into git. The only difference are the file timestamps.

tables.docx from git:

  640  2017-09-10 15:22   _rels/.rels
  368  2017-09-10 15:22   docProps/app.xml
  376  2017-09-10 15:22   docProps/core.xml
  905  2017-09-10 15:22   word/settings.xml
 2154  2017-09-10 15:22   word/document.xml
  598  2017-09-10 15:22   word/_rels/document.xml.rels
 3314  2017-09-10 15:22   word/numbering.xml
 7629  2017-09-10 15:22   word/styles.xml
 1314  2017-09-10 15:22   [Content_Types].xml

tables.docx from issue:

  640  2017-09-23 14:50   _rels/.rels
  368  2017-09-23 14:50   docProps/app.xml
  376  2017-09-23 14:50   docProps/core.xml
  905  2017-09-23 14:50   word/settings.xml
 2154  2017-09-23 14:50   word/document.xml
  598  2017-09-23 14:50   word/_rels/document.xml.rels
 3314  2017-09-23 14:50   word/numbering.xml
 7629  2017-09-23 14:50   word/styles.xml
 1314  2017-09-23 14:50   [Content_Types].xml

I unzipped your tables.docx into 'bad', and the git one into 'good' and computed an MD5 of every file. All of the contents are bit for bit identical:

1b44ca7425316d9aca9fae17d7e92e44  ./bad/_rels/.rels
1b44ca7425316d9aca9fae17d7e92e44  ./good/_rels/.rels
2969761c44489e09db77fa2ad2ddd3e1  ./bad/word/_rels/document.xml.rels
2969761c44489e09db77fa2ad2ddd3e1  ./good/word/_rels/document.xml.rels
2c7ffa02eb76f65860184d932f1265d0  ./bad/word/document.xml
2c7ffa02eb76f65860184d932f1265d0  ./good/word/document.xml
3188ac6d264f0acd2c9bf52f5d3fecb0  ./bad/docProps/core.xml
3188ac6d264f0acd2c9bf52f5d3fecb0  ./good/docProps/core.xml
522a9750f123b5173723af98fed3d492  ./bad/[Content_Types].xml
522a9750f123b5173723af98fed3d492  ./good/[Content_Types].xml
5ac9579b0966140d6f2f0bee8de7cece  ./bad/word/styles.xml
5ac9579b0966140d6f2f0bee8de7cece  ./good/word/styles.xml
7aba44afca84160f76a234f8f21a6c1a  ./bad/word/settings.xml
7aba44afca84160f76a234f8f21a6c1a  ./good/word/settings.xml
c6471391d99e52275b6ff994ab184faf  ./bad/word/numbering.xml
c6471391d99e52275b6ff994ab184faf  ./good/word/numbering.xml
ce0666ba9a789629b4861e2a7c2a230a  ./bad/docProps/app.xml
ce0666ba9a789629b4861e2a7c2a230a  ./good/docProps/app.xml

If you can open the tables.docx from git, you should be able to open the one you created as well.

from unioffice.

thxallvu avatar thxallvu commented on July 25, 2024

I tested the code in ubuntu 16.04 again. and the informantion is as follows:
go version go1.8.3 linux/amd64 it works.i can open with LibreOffice Writer.

Conclusion:
I tested the code 3 times in different environments.detals are as follows:
1.Offical environment: windows 10+office365(you mentioned) opened with 0ffice365

2.workstation: windows7+MS-office-2013 cannot open,both opened with LibreOffice and WPS

3.laptop: windows8+MS-office-2007 cannot open,both opened with LibreOffice and WPS

4.vmware: ubuntu16.04+ LibreOffice5 can open,copy file to windows ,cannot open with office2007

And i have a try. i use both the LibreOffice Writer and WPS to open the so called "bad" files,and they all succeed. So i think that office-2007/2013 cant open it and office365/WPS/LibreOffice can 。but I remember that i opened it successfully with office-2013 before,so I re-download your _Example/.../.docx and find that i couldn‘t open it anymore with office....

from unioffice.

tbaliance avatar tbaliance commented on July 25, 2024

@thxallvu I don't have Office 2007, but I do have 2013. I'll test with it and let you know what I figure out.

from unioffice.

tbaliance avatar tbaliance commented on July 25, 2024

@thxallvu All I've got is Win7 with Office Professional Plus 2013, and all of the sample documents work there correctly for me.

Office 2007 is end of life'd in about 2 weeks according to https://support.microsoft.com/en-us/help/3198497/office-2007-approaching-end-of-extended-support as well.

from unioffice.

thxallvu avatar thxallvu commented on July 25, 2024

I install the MS office 2016 and try it again and it works! thank you for all your replies and your patience!

from unioffice.

tbaliance avatar tbaliance commented on July 25, 2024

No problem, glad you got it worked out!

from unioffice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.