jmcnamara / MSVCLibXlsxWriter

A MSVC project to build a Windows DLL for libxlsxwriter
http://libxlsxwriter.github.io
22 stars 15 forks source link

outline_collapsed.c fails on Visual Studio 2017 #3

Open fordp2002 opened 6 years ago

fordp2002 commented 6 years ago

I have a python script that processes histories from another program which range in size from small to huge. It works great but is slow of course when building very large spreadsheets (It takes several minutes).

I am in the process of making a much faster c++ windows 64 bit exe version. It has gone well so far but I cannot get the outlines I need working, but I have a couple of issues.

In the end I have compiled the the "outline_collapsed.c" test and that fails to work too. 1) I have to comment out the initialisers e.g. lxw_row_col_options options1 = { /*.hidden =*/ 0, /*.level = */ 2, /*.collapsed =*/ 0 };

This may well be just me not able to get Visual studio configured properly. 2) The outlines however are not working. outline_collapsed.xlsx

Any ideas why I am failing to make this do as it should?

jmcnamara commented 6 years ago

Hi,

The version of libxlsxwriter that is embedded in MSVCLibXlsxWriter is 0.7.2 and outlines were added in 0.7.6: https://libxlsxwriter.github.io/changes.html

You can try fix this in your local copy by doing a "git pull origin" in the libxlsxwriter subdirectory, and then updating with MSVC and fix the import for the new/missing function symbols.

Alternatively you can set up a project using CMAKE, which is the preferred method in recent releases: https://libxlsxwriter.github.io/getting_started.html#gsg_cmake

I'll leave this issue open until I bring this version up to date.

John

fordp2002 commented 6 years ago

Thanks for getting back to me. I am an embedded guy and have never had the need to use CMAKE. I installed it and tried to follow the instructions but it was showing some errors related to zlib and also trying to make a Visual Studio 2015 project. I have 2013 and 2017 but not 2015.

I also tried "git pull origin" in the directory as you suggested but that failed too.

`> You are not currently on a branch. Please specify which branch you want to merge with. See git-pull(1) for details.

git pull <remote> <branch>`

It seems building what appears simple command line exe is much harder than I anticipated!

I will monitor when this bug is closed and try again then. In the meantime my python version with your python library works as intended many thanks for your libraries!

jmcnamara commented 6 years ago

I also tried "git pull origin" in the directory as you suggested but that failed too.

Sorry for the misdirect. That should have been:

git pull origin master

After that if you rebuild the LibXlsxWriter solution and copy the updated lib file to the ExampleExe folder it should work.

I tested it and it works.