February 15, 2015, 10:44 am
Hi
When I clone the source (Git hash: 4cbcac89e85eb03c9cf31ad4162e729db69a596f) and run the tests 95 of the tests fails.
I have not analyzed all of them, just picked the first: AddingDataSet:
```
Test Name: AddingDataSet
Test FullName: ClosedXML_Tests.Examples.MiscTests.AddingDataSet
Test Source: c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs : line 12
Test Outcome: Failed
Test Duration: 0:00:00.972
Result Message:
Actual file 'C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx' is different than the expected file 'Misc.AddingDataSet.xlsx'. The difference is: '/xl/styles.xml :NonEqual
/xl/worksheets/sheet.xml :NonEqual
/xl/worksheets/sheet2.xml :NonEqual
/xl/worksheets/sheet3.xml :NonEqual
'
Expected: True
But was: False
Result StackTrace:
at ClosedXML_Tests.TestHelper.RunTestExample[T](String filePartName) in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\TestHelper.cs:line 83
at ClosedXML_Tests.Examples.MiscTests.AddingDataSet() in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs:line 13
```
I unpacked the ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx and ClosedXML_Tests\Resource\Examples\Misc\AddingDataSet.xlsx by renaming them to zip, unpacking and then comparing them.
In /xl/styles.xml applyNumberFormat="1" is in the Debug... and applyNumberFormat="0" in the Resource...
The same with applyAlignment="1" vs applyAlignment="0".
In /xl/worksheets/sheet.xml and /xl/worksheets/sheet2.xml and /xl/worksheets/sheet3.xml there is the same difference
<x:col min="4" max="4" width="9.4906250000000014" style="0" customWidth="1" /> in Debug... and
<x:col min="4" max="4" width="9.830625" style="0" customWidth="1" /> in Resource...
Any ideas what might be wrong?
I tried changing locale to both en-US and en-GB without success, but since there are no textual differences in the files I suppose that would not be the case anyway.
Seems something in the environment could be the issue. But what?
Framework/OS version? Screen resolution?
↧
February 15, 2015, 10:45 am
Hi
When I clone the source (Git hash: 4cbcac89e85eb03c9cf31ad4162e729db69a596f) and run the tests 95 of the tests fails.
I have not analyzed all of them, just picked the first: AddingDataSet:
```
Test Name: AddingDataSet
Test FullName: ClosedXML_Tests.Examples.MiscTests.AddingDataSet
Test Source: c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs : line 12
Test Outcome: Failed
Test Duration: 0:00:00.972
Result Message:
Actual file 'C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx' is different than the expected file 'Misc.AddingDataSet.xlsx'. The difference is: '/xl/styles.xml :NonEqual
/xl/worksheets/sheet.xml :NonEqual
/xl/worksheets/sheet2.xml :NonEqual
/xl/worksheets/sheet3.xml :NonEqual
'
Expected: True
But was: False
Result StackTrace:
at ClosedXML_Tests.TestHelper.RunTestExample[T](String filePartName) in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\TestHelper.cs:line 83
at ClosedXML_Tests.Examples.MiscTests.AddingDataSet() in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs:line 13
```
I unpacked the ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx and ClosedXML_Tests\Resource\Examples\Misc\AddingDataSet.xlsx by renaming them to zip, unpacking and then comparing them.
In /xl/styles.xml applyNumberFormat="1" is in the Debug... and applyNumberFormat="0" in the Resource...
The same with applyAlignment="1" vs applyAlignment="0".
In /xl/worksheets/sheet.xml and /xl/worksheets/sheet2.xml and /xl/worksheets/sheet3.xml there is the same difference
<x:col min="4" max="4" width="9.4906250000000014" style="0" customWidth="1" /> in Debug... and
<x:col min="4" max="4" width="9.830625" style="0" customWidth="1" /> in Resource...
Any ideas what might be wrong?
I tried changing locale to both en-US and en-GB without success, but since there are no textual differences in the files I suppose that would not be the case anyway.
Seems something in the environment could be the issue. But what?
Framework/OS version? Screen resolution?
I attached the output from the test written to C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx
↧
↧
February 16, 2015, 10:43 am
Hi
When I clone the source (Git hash: 4cbcac89e85eb03c9cf31ad4162e729db69a596f) and run the tests 95 of the tests fails.
I have not analyzed all of them, just picked the first: AddingDataSet:
```
Test Name: AddingDataSet
Test FullName: ClosedXML_Tests.Examples.MiscTests.AddingDataSet
Test Source: c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs : line 12
Test Outcome: Failed
Test Duration: 0:00:00.972
Result Message:
Actual file 'C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx' is different than the expected file 'Misc.AddingDataSet.xlsx'. The difference is: '/xl/styles.xml :NonEqual
/xl/worksheets/sheet.xml :NonEqual
/xl/worksheets/sheet2.xml :NonEqual
/xl/worksheets/sheet3.xml :NonEqual
'
Expected: True
But was: False
Result StackTrace:
at ClosedXML_Tests.TestHelper.RunTestExample[T](String filePartName) in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\TestHelper.cs:line 83
at ClosedXML_Tests.Examples.MiscTests.AddingDataSet() in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs:line 13
```
I unpacked the ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx and ClosedXML_Tests\Resource\Examples\Misc\AddingDataSet.xlsx by renaming them to zip, unpacking and then comparing them.
In /xl/styles.xml applyNumberFormat="1" is in the Debug... and applyNumberFormat="0" in the Resource...
The same with applyAlignment="1" vs applyAlignment="0".
In /xl/worksheets/sheet.xml and /xl/worksheets/sheet2.xml and /xl/worksheets/sheet3.xml there is the same difference
<x:col min="4" max="4" width="9.4906250000000014" style="0" customWidth="1" /> in Debug... and
<x:col min="4" max="4" width="9.830625" style="0" customWidth="1" /> in Resource...
Any ideas what might be wrong?
I tried changing locale to both en-US and en-GB without success, but since there are no textual differences in the files I suppose that would not be the case anyway.
Seems something in the environment could be the issue. But what?
Framework/OS version? Screen resolution?
I attached the output from the test written to C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx
Comments: I have created a small pull request to fix some culture issues in https://closedxml.codeplex.com/SourceControl/network/forks/AlbinSunnanbo/closedxml/contribution/8034
but most of the above tests including the one mentioned above still fails on my computer.
↧
February 16, 2015, 11:28 am
Hi
When I clone the source (Git hash: 4cbcac89e85eb03c9cf31ad4162e729db69a596f) and run the tests 95 of the tests fails.
I have not analyzed all of them, just picked the first: AddingDataSet:
```
Test Name: AddingDataSet
Test FullName: ClosedXML_Tests.Examples.MiscTests.AddingDataSet
Test Source: c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs : line 12
Test Outcome: Failed
Test Duration: 0:00:00.972
Result Message:
Actual file 'C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx' is different than the expected file 'Misc.AddingDataSet.xlsx'. The difference is: '/xl/styles.xml :NonEqual
/xl/worksheets/sheet.xml :NonEqual
/xl/worksheets/sheet2.xml :NonEqual
/xl/worksheets/sheet3.xml :NonEqual
'
Expected: True
But was: False
Result StackTrace:
at ClosedXML_Tests.TestHelper.RunTestExample[T](String filePartName) in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\TestHelper.cs:line 83
at ClosedXML_Tests.Examples.MiscTests.AddingDataSet() in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs:line 13
```
I unpacked the ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx and ClosedXML_Tests\Resource\Examples\Misc\AddingDataSet.xlsx by renaming them to zip, unpacking and then comparing them.
In /xl/styles.xml applyNumberFormat="1" is in the Debug... and applyNumberFormat="0" in the Resource...
The same with applyAlignment="1" vs applyAlignment="0".
In /xl/worksheets/sheet.xml and /xl/worksheets/sheet2.xml and /xl/worksheets/sheet3.xml there is the same difference
<x:col min="4" max="4" width="9.4906250000000014" style="0" customWidth="1" /> in Debug... and
<x:col min="4" max="4" width="9.830625" style="0" customWidth="1" /> in Resource...
Any ideas what might be wrong?
I tried changing locale to both en-US and en-GB without success, but since there are no textual differences in the files I suppose that would not be the case anyway.
Seems something in the environment could be the issue. But what?
Framework/OS version? Screen resolution?
I attached the output from the test written to C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx
Comments: Coincidentally I was just doing the same thing and also see similar differences to what you see (although I have 93 and not 95 tests fail). The failures I have looked at all have the same difference:
applyNumberFormat="0" in the resource
applyNumberFormat="1" in the test output
Interestingly, in AddingDataSet.xlsx I only see the applyNumberFormat difference, I don't have any difference in width.
↧
February 16, 2015, 11:45 am
Hi
When I clone the source (Git hash: 4cbcac89e85eb03c9cf31ad4162e729db69a596f) and run the tests 95 of the tests fails.
I have not analyzed all of them, just picked the first: AddingDataSet:
```
Test Name: AddingDataSet
Test FullName: ClosedXML_Tests.Examples.MiscTests.AddingDataSet
Test Source: c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs : line 12
Test Outcome: Failed
Test Duration: 0:00:00.972
Result Message:
Actual file 'C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx' is different than the expected file 'Misc.AddingDataSet.xlsx'. The difference is: '/xl/styles.xml :NonEqual
/xl/worksheets/sheet.xml :NonEqual
/xl/worksheets/sheet2.xml :NonEqual
/xl/worksheets/sheet3.xml :NonEqual
'
Expected: True
But was: False
Result StackTrace:
at ClosedXML_Tests.TestHelper.RunTestExample[T](String filePartName) in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\TestHelper.cs:line 83
at ClosedXML_Tests.Examples.MiscTests.AddingDataSet() in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs:line 13
```
I unpacked the ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx and ClosedXML_Tests\Resource\Examples\Misc\AddingDataSet.xlsx by renaming them to zip, unpacking and then comparing them.
In /xl/styles.xml applyNumberFormat="1" is in the Debug... and applyNumberFormat="0" in the Resource...
The same with applyAlignment="1" vs applyAlignment="0".
In /xl/worksheets/sheet.xml and /xl/worksheets/sheet2.xml and /xl/worksheets/sheet3.xml there is the same difference
<x:col min="4" max="4" width="9.4906250000000014" style="0" customWidth="1" /> in Debug... and
<x:col min="4" max="4" width="9.830625" style="0" customWidth="1" /> in Resource...
Any ideas what might be wrong?
I tried changing locale to both en-US and en-GB without success, but since there are no textual differences in the files I suppose that would not be the case anyway.
Seems something in the environment could be the issue. But what?
Framework/OS version? Screen resolution?
I attached the output from the test written to C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx
Comments: I got hold of another computer with en-US locale and there I got 93 failing tests too.
And no differences in with, just applyNumberFormat and applyAlignment
↧
↧
February 16, 2015, 11:49 am
Hi
When I clone the source (Git hash: 4cbcac89e85eb03c9cf31ad4162e729db69a596f) and run the tests 95 of the tests fails.
I have not analyzed all of them, just picked the first: AddingDataSet:
```
Test Name: AddingDataSet
Test FullName: ClosedXML_Tests.Examples.MiscTests.AddingDataSet
Test Source: c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs : line 12
Test Outcome: Failed
Test Duration: 0:00:00.972
Result Message:
Actual file 'C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx' is different than the expected file 'Misc.AddingDataSet.xlsx'. The difference is: '/xl/styles.xml :NonEqual
/xl/worksheets/sheet.xml :NonEqual
/xl/worksheets/sheet2.xml :NonEqual
/xl/worksheets/sheet3.xml :NonEqual
'
Expected: True
But was: False
Result StackTrace:
at ClosedXML_Tests.TestHelper.RunTestExample[T](String filePartName) in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\TestHelper.cs:line 83
at ClosedXML_Tests.Examples.MiscTests.AddingDataSet() in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs:line 13
```
I unpacked the ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx and ClosedXML_Tests\Resource\Examples\Misc\AddingDataSet.xlsx by renaming them to zip, unpacking and then comparing them.
In /xl/styles.xml applyNumberFormat="1" is in the Debug... and applyNumberFormat="0" in the Resource...
The same with applyAlignment="1" vs applyAlignment="0".
In /xl/worksheets/sheet.xml and /xl/worksheets/sheet2.xml and /xl/worksheets/sheet3.xml there is the same difference
<x:col min="4" max="4" width="9.4906250000000014" style="0" customWidth="1" /> in Debug... and
<x:col min="4" max="4" width="9.830625" style="0" customWidth="1" /> in Resource...
Any ideas what might be wrong?
I tried changing locale to both en-US and en-GB without success, but since there are no textual differences in the files I suppose that would not be the case anyway.
Seems something in the environment could be the issue. But what?
Framework/OS version? Screen resolution?
I attached the output from the test written to C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx
Comments: When I examine the output of https://closedxml.codeplex.com/SourceControl/network/forks/AlbinSunnanbo/closedxml/contribution/8034 running on my Swedish computer the width does not differ either.
Conclusion: CurrentCulture affects the width, but applyNumberFormat and applyAlignment is affected by something else.
↧
February 16, 2015, 12:04 pm
↧
February 16, 2015, 12:41 pm
Hi
When I clone the source (Git hash: 4cbcac89e85eb03c9cf31ad4162e729db69a596f) and run the tests 95 of the tests fails.
I have not analyzed all of them, just picked the first: AddingDataSet:
```
Test Name: AddingDataSet
Test FullName: ClosedXML_Tests.Examples.MiscTests.AddingDataSet
Test Source: c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs : line 12
Test Outcome: Failed
Test Duration: 0:00:00.972
Result Message:
Actual file 'C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx' is different than the expected file 'Misc.AddingDataSet.xlsx'. The difference is: '/xl/styles.xml :NonEqual
/xl/worksheets/sheet.xml :NonEqual
/xl/worksheets/sheet2.xml :NonEqual
/xl/worksheets/sheet3.xml :NonEqual
'
Expected: True
But was: False
Result StackTrace:
at ClosedXML_Tests.TestHelper.RunTestExample[T](String filePartName) in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\TestHelper.cs:line 83
at ClosedXML_Tests.Examples.MiscTests.AddingDataSet() in c:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\Examples\MiscTests.cs:line 13
```
I unpacked the ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx and ClosedXML_Tests\Resource\Examples\Misc\AddingDataSet.xlsx by renaming them to zip, unpacking and then comparing them.
In /xl/styles.xml applyNumberFormat="1" is in the Debug... and applyNumberFormat="0" in the Resource...
The same with applyAlignment="1" vs applyAlignment="0".
In /xl/worksheets/sheet.xml and /xl/worksheets/sheet2.xml and /xl/worksheets/sheet3.xml there is the same difference
<x:col min="4" max="4" width="9.4906250000000014" style="0" customWidth="1" /> in Debug... and
<x:col min="4" max="4" width="9.830625" style="0" customWidth="1" /> in Resource...
Any ideas what might be wrong?
I tried changing locale to both en-US and en-GB without success, but since there are no textual differences in the files I suppose that would not be the case anyway.
Seems something in the environment could be the issue. But what?
Framework/OS version? Screen resolution?
I attached the output from the test written to C:\Git\closedxml\ClosedXML\ClosedXML\ClosedXML_Tests\bin\Debug\Examples\Misc\AddingDataSet.xlsx
Comments: I have tracked down applyNumberFormat and applyAlignment.
They are only set in XLWorkbook.GetCellFormat
And they were recently changed from false to true in commit https://closedxml.codeplex.com/SourceControl/changeset/015fdc82c156f62bc5e4e94831d8ade8ba4c0801
Have update of the test data been forgotten at this commit?
↧
February 16, 2015, 12:54 pm
↧
↧
February 18, 2015, 3:29 am
i have exported excel file successfully but problem is that that exported excel file is not getting opened in android, whereas i have seen many applications that export files to excel and same files are getting opened on android, then why not my exported file?
//filled dt sucessfully
using (XLWorkbook wb = new XLWorkbook())
{
wb.Worksheets.Add(dt);
Response.Buffer = true;
using (MemoryStream MyMemoryStream = new MemoryStream())
{
wb.SaveAs(MyMemoryStream);
//response starts
Response.Cache.SetCacheability(HttpCacheability.Private);
Response.CacheControl = "private";
Response.Charset = System.Text.UTF8Encoding.UTF8.WebName;
Response.ContentEncoding = System.Text.UTF8Encoding.UTF8;
Response.AppendHeader("Content-Length", MyMemoryStream.Length.ToString());
Response.AppendHeader("Pragma", "cache");
Response.AppendHeader("Expires", "60");
Response.AppendHeader("Content-Disposition",
"attachment; " +
"filename=\"Reports.xlsx\"; " +
"size=" + MyMemoryStream.Length.ToString() + "; " +
"creation-date=" + DateTime.Now.ToString() + "; " +
"modification-date=" + DateTime.Now.ToString() + "; " +
"read-date=" + DateTime.Now.ToString());
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
MyMemoryStream.WriteTo(Response.OutputStream);
Response.Flush();
Response.End();
}
}
on android docs to go app says "length=0; index0" and polaris office 5 app says "this document can not be opened"..
↧
February 18, 2015, 7:08 pm
OpenXML uses "runs" to allow different styles within a single cell
Ex: This is in a single cell
Is that possible in ClosedXML, and if so, how?
Thanks!
↧
February 18, 2015, 10:42 pm
↧
February 19, 2015, 7:12 am
how to get the number format like 1,234,456,789,234
↧
↧
February 19, 2015, 7:15 am
↧
February 19, 2015, 7:38 am
Hi I tried but i want comma seperator for every 3 digits
↧
February 19, 2015, 7:40 am
.Style.NumberFormat.NumberFormatId = 3
↧
February 19, 2015, 7:40 am
Hi how to remove gridlines i am using
Sheet.PageSetup.ShowGridlines = false;
it is not working
↧
↧
February 19, 2015, 7:59 am
Hi MDeleon,
i am using .Style.NumberFormat.NumberFormatId = 3 getting like below format
555555555,55,555%
but i need like 5,555,555,555,555
↧
February 19, 2015, 8:24 am
Either lookup the number format id for your locale or use "#,###"
↧
February 19, 2015, 9:27 am
How would you do it in Excel? (You'd do the same with ClosedXML)
↧