jmcnamara / libxlsxwriter

A C library for creating Excel XLSX files.
https://libxlsxwriter.github.io
Other
1.48k stars 330 forks source link

LXW_ERROR_CREATING_XLSX_FILE: error creating output xlsx file. Usually a permissions error. #430

Closed myspace9 closed 7 months ago

myspace9 commented 7 months ago

libxlsxwriter: Reporting Bugs

Here are some tips on reporting bugs in libxlsxwriter.

Upgrade to the latest version of the library

Upgrade to the latest version of the library since the bug you are reporting may already be fixed.

Check the Changes section of the documentation to see what has changed in the latest versions.

You can check which version of libxlsxwriter that you are using by checking the xlsxwriter.h header file or by adding the following to your program:

#include <stdio.h>
#include "xlsxwriter.h"

int main() {

    printf("Libxlsxwriter version = %s\n", lxw_version());

    return 0;
}

Read the documentation

Read or search the libxlsxwriter documentation to see if the issue you are encountering is already explained.

Look at the example programs

There are many examples programs in the distribution. Try to identify an example program that corresponds to your query and adapt it to use as a bug report.

Tips for submitting a bug report

  1. Describe the problem as clearly and as concisely as possible.
  2. Include a sample program. This is probably the most important step. It is generally easier to describe a problem in code than in written prose.
  3. The sample program should be as small as possible to demonstrate the problem. Don't copy and paste large non-relevant sections of your program.

A sample bug report is shown below. This format helps analyze and respond to the bug report more quickly.

Subject: Issue with SOMETHING

Greetings,

I am using libxlsxwriter to do SOMETHING but it appears to do SOMETHING ELSE.

I am using CC version X.Y.Z, OS = uname and libxlsxwriter x.y.z.

Here is some code that demonstrates the problem:

#include "xlsxwriter.h"

int main() {

   lxw_workbook  *workbook  = workbook_new("bug_report.xlsx");
   lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);

   worksheet_write_string(worksheet, 0, 0, "Hello", NULL);
   worksheet_write_number(worksheet, 1, 0, 123, NULL);

   return workbook_close(workbook);
}

tip: error creating output xlsx file. Usually a permissions error.

jmcnamara commented 7 months ago

That error happens for several possible reasons that aren't related to libxlsxwriter: