diff --git a/src/FsSpreadsheet.Exceljs/Worksheet.fs b/src/FsSpreadsheet.Exceljs/Worksheet.fs index b7124314..ed84e4c2 100644 --- a/src/FsSpreadsheet.Exceljs/Worksheet.fs +++ b/src/FsSpreadsheet.Exceljs/Worksheet.fs @@ -85,8 +85,8 @@ module JsWorksheet = log msg anyElse |> createFscell DataType.String | ValueType.Hyperlink -> - log (c.value.Value?text) - vTemp |> createFscell DataType.String + //log (c.value.Value?text) + c.value.Value?hyperlink |> createFscell DataType.String | anyElse -> let msg = sprintf "ValueType `%A` (%s) is not fully implemented in FsSpreadsheet and is handled as string input. In %s: (%i,%i)" anyElse vTemp jsws.name rowIndex columnIndex log msg diff --git a/tests/FsSpreadsheet.ExcelIO.Tests/DefaultIO.Tests.fs b/tests/FsSpreadsheet.ExcelIO.Tests/DefaultIO.Tests.fs index e837d505..989d1f21 100644 --- a/tests/FsSpreadsheet.ExcelIO.Tests/DefaultIO.Tests.fs +++ b/tests/FsSpreadsheet.ExcelIO.Tests/DefaultIO.Tests.fs @@ -30,7 +30,7 @@ let tests_Read = testList "Read" [ let wb = readFromTestFile DefaultTestObject.TestFiles.ClosedXML Expect.isDefaultTestObject wb testCase "FsSpreadsheet" <| fun _ -> - let wb = readFromTestFile DefaultTestObject.TestFiles.FsSpreadsheet + let wb = readFromTestFile DefaultTestObject.TestFiles.FsSpreadsheetNET Expect.isDefaultTestObject wb ] diff --git a/tests/FsSpreadsheet.Exceljs.Tests/DefaultIO.Tests.fs b/tests/FsSpreadsheet.Exceljs.Tests/DefaultIO.Tests.fs index 5f6a1083..3b1604c7 100644 --- a/tests/FsSpreadsheet.Exceljs.Tests/DefaultIO.Tests.fs +++ b/tests/FsSpreadsheet.Exceljs.Tests/DefaultIO.Tests.fs @@ -26,7 +26,7 @@ let tests_Read = testList "Read" [ Expect.isDefaultTestObject wb } testCaseAsync "FsSpreadsheet" <| async { - let! wb = readFromTestFile DefaultTestObject.TestFiles.FsSpreadsheet |> Async.AwaitPromise + let! wb = readFromTestFile DefaultTestObject.TestFiles.FsSpreadsheetNET |> Async.AwaitPromise Expect.isDefaultTestObject wb } ] \ No newline at end of file diff --git a/tests/TestUtils/DefaultTestObjects.fs b/tests/TestUtils/DefaultTestObjects.fs index 01bfc047..a607826a 100644 --- a/tests/TestUtils/DefaultTestObjects.fs +++ b/tests/TestUtils/DefaultTestObjects.fs @@ -16,7 +16,8 @@ type TestFiles = | Libre | FableExceljs | ClosedXML -| FsSpreadsheet +| FsSpreadsheetNET +| FsSpreadsheetJS member this.asFileName = match this with @@ -24,7 +25,8 @@ type TestFiles = | Libre -> "TestWorkbook_Libre.xlsx" | FableExceljs -> "TestWorkbook_FableExcelJS.xlsx" | ClosedXML -> "TestWorkbook_ClosedXML.xlsx" - | FsSpreadsheet -> "TestWorkbook_FsSpreadsheet.xlsx" + | FsSpreadsheetNET -> "TestWorkbook_FsSpreadsheet.net.xlsx" + | FsSpreadsheetJS -> "TestWorkbook_FsSpreadsheet.js.xlsx" member this.asRelativePath = $"../TestUtils/{testFolder}/{this.asFileName}" member this.asRelativePathNode = $"./tests/TestUtils/{testFolder}/{this.asFileName}" diff --git a/tests/TestUtils/TestFiles/Scripts/fsSpreadsheet.fsx b/tests/TestUtils/TestFiles/Scripts/fsSpreadsheet.fsx index 6de3ddc3..0e7349d7 100644 --- a/tests/TestUtils/TestFiles/Scripts/fsSpreadsheet.fsx +++ b/tests/TestUtils/TestFiles/Scripts/fsSpreadsheet.fsx @@ -9,7 +9,7 @@ open FsSpreadsheet.ExcelIO let inputPath = @"../TestWorkbook_Excel.xlsx" -let outputPath = @"../TestWorkbook_FsSpreadsheet.xlsx" +let outputPath = @"../TestWorkbook_FsSpreadsheet.net.xlsx" let wb = FsWorkbook.fromXlsxFile (inputPath) diff --git a/tests/TestUtils/TestFiles/Scripts/fsSpreadsheet.js b/tests/TestUtils/TestFiles/Scripts/fsSpreadsheet.js new file mode 100644 index 00000000..11ed0b0f --- /dev/null +++ b/tests/TestUtils/TestFiles/Scripts/fsSpreadsheet.js @@ -0,0 +1,14 @@ +import { Xlsx } from "./fable/Xlsx.js" + +export const inputPath = "../TestWorkbook_Excel.xlsx"; + +export const outputPath = "../TestWorkbook_FsSpreadsheet.js.xlsx"; + +async function run() { + let wb = await Xlsx.fromXlsxFile(inputPath) + console.log(wb) + // await Xlsx.toFile(wb) +} + +run(); + diff --git a/tests/TestUtils/TestFiles/Scripts/runFsSpreadsheet.cmd b/tests/TestUtils/TestFiles/Scripts/runFsSpreadsheet.fsx.cmd similarity index 100% rename from tests/TestUtils/TestFiles/Scripts/runFsSpreadsheet.cmd rename to tests/TestUtils/TestFiles/Scripts/runFsSpreadsheet.fsx.cmd diff --git a/tests/TestUtils/TestFiles/Scripts/runFsSpreadsheet.js.cmd b/tests/TestUtils/TestFiles/Scripts/runFsSpreadsheet.js.cmd new file mode 100644 index 00000000..7d02c3cd --- /dev/null +++ b/tests/TestUtils/TestFiles/Scripts/runFsSpreadsheet.js.cmd @@ -0,0 +1,3 @@ +dotnet fable ../../../../src/FsSpreadsheet.Exceljs -o ./fable --noCache + +node ./fsSpreadsheet.js \ No newline at end of file diff --git a/tests/TestUtils/TestFiles/TestWorkbook_FableExceljs.xlsx b/tests/TestUtils/TestFiles/TestWorkbook_FableExceljs.xlsx index 4e3ba1ba..28fc364e 100644 Binary files a/tests/TestUtils/TestFiles/TestWorkbook_FableExceljs.xlsx and b/tests/TestUtils/TestFiles/TestWorkbook_FableExceljs.xlsx differ diff --git a/tests/TestUtils/TestFiles/TestWorkbook_FsSpreadsheet.xlsx b/tests/TestUtils/TestFiles/TestWorkbook_FsSpreadsheet.net.xlsx similarity index 55% rename from tests/TestUtils/TestFiles/TestWorkbook_FsSpreadsheet.xlsx rename to tests/TestUtils/TestFiles/TestWorkbook_FsSpreadsheet.net.xlsx index 5b04b791..40c1cd02 100644 Binary files a/tests/TestUtils/TestFiles/TestWorkbook_FsSpreadsheet.xlsx and b/tests/TestUtils/TestFiles/TestWorkbook_FsSpreadsheet.net.xlsx differ