2
Answers

OpenXML Excel program error

A Repasky

A Repasky

13y
3.7k
1
I am getting the following error when I try to open the file.  I just started testing this and I do not know what to do.  So the code is very preliminary.  The code for the class is attached.  I only have about a year of C# experience and have not used OpenXML before and the lead programmer is hard to work for.

I want to be able to send a table (or change it to a list or class or something) to this class to make a xlsx spreadsheet.  We want to eliminate the need for Excel.  This is for health care field. 

Thanks for any help I can get on this.

Arep

Replaced Part: /xl/worksheets/sheet.xml part with XML error.  A document must contain exactly one root element. Line 1, column 0.

Attachment: createexcelxml.zip

Answers (2)
0
Bhabani Prasad

Bhabani Prasad

NA 1.4k 36.2k 10y
You just include the exception details as it will be easier to find the detailed error
0
Rajagopalan R V

Rajagopalan R V

NA 422 33.2k 10y
Sorry Can't Get Meaning For Your Above Post Please Can You Explain it Clearly
0
Jasmine Nagrecha

Jasmine Nagrecha

NA 180 4.2k 10y
i need to keep ssl=false, and defaultcredentials is =false. ideally, these settings should help. but i guess its something related to machine configuration
0
Rajagopalan R V

Rajagopalan R V

NA 422 33.2k 10y
Hi.,

Had You Allow Permissions in IIS

If Not Check With Below Method

Go to IIS
IIS---->
Default SMTP Virtual Server (Right Click) ----> Properties ----> Access ----> Relay ----> All Except the List Below (Radio Button) Select that And Click Ok And then Execute Your Code

If U Got Solution With this Mark it Has Accepted

Or Else Please Post The Error

With Regards..,

R.V.Rajagopalan
0
Yadlapalli Srikanth

Yadlapalli Srikanth

NA 238 51.6k 10y
Please share the sample code and also do the following settings

smtpClient.UseDefaultCredentials = false;
smtpClient.EnableSsl = true;