Skip to content

Commit

Permalink
Merge pull request #89 from fslaborg/pythonWorkbookReading
Browse files Browse the repository at this point in the history
Fix Python workbook reading
  • Loading branch information
HLWeil authored Apr 9, 2024
2 parents 0d578e2 + 7fe1c6a commit 1ab4da0
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 5 deletions.
10 changes: 10 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
### 6.1.2+62db5ab (Released 2024-4-9)
* Additions:
* [[#62db5ab](https://github.com/CSBiology/FsSpreadsheet/commit/62db5abb62cfd411355f5e4b6a466aeb622e448e)] update project dependenices on FsSpreadsheet.Core

### 6.1.1+0f0535a (Released 2024-4-8)
* Additions:
* [[#0d578e2](https://github.com/CSBiology/FsSpreadsheet/commit/0d578e27d65179857267c0f4601bc75a22327b9a)] bump to 6.1.0
* Bugfixes:
* [[#0f0535a](https://github.com/CSBiology/FsSpreadsheet/commit/0f0535a4afbc44e5980c89e608334b96e38a4a7d)] check and fix py xlsx reader rescanning rows

### 6.1.0+ed6795c (Released 2024-3-19)
* Additions:
* [[#3f1fb55](https://github.com/CSBiology/FsSpreadsheet/commit/3f1fb55e75d2ea56dec8787f0e6dfceccfd19ef5)] start working on json writing
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fslab/fsspreadsheet",
"version": "6.1.0",
"version": "6.1.2",
"description": "Minimal spreadsheet creation and manipulation using exceljs io.",
"type": "module",
"main": "Xlsx.js",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "fsspreadsheet"
version = "6.1.0"
version = "6.1.2"
description = "Fable library for Spreadsheet creation and manipulation"
authors = ["Heinrich Lukas Weil <[email protected]>", "Kevin Frey <[email protected]>"]
maintainers = ["Oliver Maus"]
Expand Down
2 changes: 1 addition & 1 deletion src/FsSpreadsheet.CsvIO/FsSpreadsheet.CsvIO.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FsSpreadsheet\FsSpreadsheet.fsproj" PackageVersion="[5.0.0, 6.0.0)" />
<ProjectReference Include="..\FsSpreadsheet\FsSpreadsheet.fsproj" PackageVersion="[6.0.0, 7.0.0)" />
</ItemGroup>

<Target Name="UseExplicitPackageVersions" BeforeTargets="GenerateNuspec">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FsSpreadsheet\FsSpreadsheet.fsproj" PackageVersion="[5.0.0, 6.0.0)" />
<ProjectReference Include="..\FsSpreadsheet\FsSpreadsheet.fsproj" PackageVersion="[6.0.0, 7.0.0)" />
<PackageReference Include="Giraffe.ViewEngine" Version="1.4.0" />
<PackageReference Include="Microsoft.DotNet.Interactive" Version="1.0.0-beta.23165.2" />
<PackageReference Include="Microsoft.DotNet.Interactive.Formatting" Version="1.0.0-beta.23165.2" />
Expand Down
2 changes: 1 addition & 1 deletion src/FsSpreadsheet.Net/FsSpreadsheet.Net.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FsSpreadsheet\FsSpreadsheet.fsproj" PackageVersion="[5.0.0, 6.0.0)" />
<ProjectReference Include="..\FsSpreadsheet\FsSpreadsheet.fsproj" PackageVersion="[6.0.0, 7.0.0)" />
</ItemGroup>

<Target Name="UseExplicitPackageVersions" BeforeTargets="GenerateNuspec">
Expand Down
1 change: 1 addition & 0 deletions src/FsSpreadsheet.Py/Workbook.fs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module PyWorkbook =
pyWB.worksheets |> Array.iter (fun (ws : Worksheet) ->
if ws.title <> "Sheet" && ws.values.Length <> 0 then
let w = PyWorksheet.toFsWorksheet ws
w.RescanRows()
fsWB.AddWorksheet(w) |> ignore
)
fsWB
4 changes: 4 additions & 0 deletions tests/FsSpreadsheet.Py.Tests/DefaultIO.Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ let private readFromTestFile (testFile: DefaultTestObject.TestFiles) =

let private tests_Read = testList "Read" [

testCase "ExcelRowCount" <| fun _ ->
let wb = readFromTestFile DefaultTestObject.TestFiles.Excel
Expect.isTrue (wb.GetWorksheetAt(1).Rows.Count > 0) "ExcelRowCount"

testCase "Excel" <| fun _ ->
let wb = readFromTestFile DefaultTestObject.TestFiles.Excel
Expect.isDefaultTestObject wb
Expand Down

0 comments on commit 1ab4da0

Please sign in to comment.