Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all 1877 articles
Browse latest View live

Created Unassigned: Lots of tests fails [9422]

$
0
0
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?

Edited Unassigned: Lots of tests fails [9422]

$
0
0
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

Commented Unassigned: Lots of tests fails [9422]

$
0
0
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.

Commented Unassigned: Lots of tests fails [9422]

$
0
0
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.

Commented Unassigned: Lots of tests fails [9422]

$
0
0
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

Commented Unassigned: Lots of tests fails [9422]

$
0
0
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.

New Post: AdjustToContent is very slow

$
0
0
I have made some preliminary work on this in a branch: https://closedxml.codeplex.com/SourceControl/network/forks/AlbinSunnanbo/closedxml?branch=PerformanceImprovements
In a simple example I have cut the times for AdjustToContents down to about one third of the original time. Now AjustToContents is faster than the XLWorkBook.SaveAs method for an example file with 10 columns, 20k rows.
I have a few other hot spots I want see if they could be improved, both in AdjustToContents and in Save, before I wrap up a pull request.

Commented Unassigned: Lots of tests fails [9422]

$
0
0
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?

New Post: AdjustToContent is very slow

New Post: exported file is getting opened on windows. but not getting opened on android.

$
0
0
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"..

New Post: Different styles within a cell?

$
0
0
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!

New Post: Different styles within a cell?

New Post: Help me

$
0
0
how to get the number format like 1,234,456,789,234

New Post: Help me

New Post: Help me

$
0
0
Hi I tried but i want comma seperator for every 3 digits

New Post: Help me

$
0
0
.Style.NumberFormat.NumberFormatId = 3

New Post: How to remove gridlines

$
0
0
Hi how to remove gridlines i am using
Sheet.PageSetup.ShowGridlines = false;
it is not working

New Post: Help me

$
0
0
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

New Post: Help me

$
0
0
Either lookup the number format id for your locale or use "#,###"

New Post: How to remove gridlines

$
0
0
How would you do it in Excel? (You'd do the same with ClosedXML)
Viewing all 1877 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>