diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000..ff2d3c3
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,9 @@
+
+
+ https://github.com/fsprojects/ExcelProvider
+ https://github.com/fsprojects/ExcelProvider/blob/master/LICENSE.txt
+ https://github.com/fsprojects/ExcelProvider/blob/master/RELEASE_NOTES.md
+ https://fsprojects.github.io/ExcelProvider/
+ images/logo.png
+
+
diff --git a/docs/content/DataTypes.xlsx b/docs/DataTypes.xlsx
similarity index 100%
rename from docs/content/DataTypes.xlsx
rename to docs/DataTypes.xlsx
diff --git a/docs/content/DataTypesNoHeader.xlsx b/docs/DataTypesNoHeader.xlsx
similarity index 100%
rename from docs/content/DataTypesNoHeader.xlsx
rename to docs/DataTypesNoHeader.xlsx
diff --git a/docs/content/MultipleRegions.xlsx b/docs/MultipleRegions.xlsx
similarity index 100%
rename from docs/content/MultipleRegions.xlsx
rename to docs/MultipleRegions.xlsx
diff --git a/docs/content/MultipleSheets.xlsx b/docs/MultipleSheets.xlsx
similarity index 100%
rename from docs/content/MultipleSheets.xlsx
rename to docs/MultipleSheets.xlsx
diff --git a/docs/content/cells.fsx b/docs/cells.fsx
similarity index 79%
rename from docs/content/cells.fsx
rename to docs/cells.fsx
index 6fc8b34..754f30e 100644
--- a/docs/content/cells.fsx
+++ b/docs/cells.fsx
@@ -1,5 +1,15 @@
+(**
+---
+title: Accessing Cells
+category: Documentation
+categoryindex: 2
+index: 4
+---
+*)
+
+
(*** hide ***)
-#I "../../bin/ExcelProvider"
+#r "../bin/ExcelProvider.Runtime/netstandard2.0/ExcelProvider.Runtime.dll"
(**
Accessing Cells
@@ -11,7 +21,7 @@ To access a particular cell you need to access the relevant row and use the fiel
Example
-------
-
+
This example demonstrates referencing the first column (with name `Fourth`) on row 4:
@@ -36,4 +46,4 @@ let testByHeader = rows.[2].GetValue "Fourth"
(*** include-value: testByIndex ***)
(*** include-value: testByHeader ***)
-(** Accessing cell values by index or string header sacrifices type safety; the result signature is `obj`. *)
\ No newline at end of file
+(** Accessing cell values by index or string header sacrifices type safety; the result signature is `obj`. *)
diff --git a/docs/content/getting-started.fsx b/docs/getting-started.fsx
similarity index 81%
rename from docs/content/getting-started.fsx
rename to docs/getting-started.fsx
index 57763cb..16d40fb 100644
--- a/docs/content/getting-started.fsx
+++ b/docs/getting-started.fsx
@@ -1,5 +1,16 @@
+(**
+---
+title: Getting Started
+category: Documentation
+categoryindex: 2
+index: 1
+---
+*)
+
+
+
(*** hide ***)
-#I "../../bin/ExcelProvider"
+#r "../bin/ExcelProvider.Runtime/netstandard2.0/ExcelProvider.Runtime.dll"
(**
Getting Started
@@ -11,8 +22,8 @@ If you are using F# scripts then just add the dll using the `#r` option.
If you then open `FSharp.Interop.Excel` you will have access to the Type Provider functionality.
-You can then create a type for an individual workbook. The simplest option is to specify just the name of the workbook.
-You will then be given typed access to the data held in the first sheet.
+You can then create a type for an individual workbook. The simplest option is to specify just the name of the workbook.
+You will then be given typed access to the data held in the first sheet.
The first row of the sheet will be treated as field names and the subsequent rows will be treated as values for these fields.
Parameters
@@ -26,10 +37,11 @@ When creating the type you can specify the following parameters:
* `HasHeaders` Whether the range contains the names of the columns as its first line.
* `ForceString` Specifies forcing data to be processed as strings. Defaults to `false`.
-All but the first are optional.
+All but the first are optional.
The parameters can be specified by position or by using the name - for example the following are equivalent:
*)
+open FSharp.Interop.Excel
type MultipleSheets1 = ExcelFile<"MultipleSheets.xlsx", "B">
type MultipleSheets2 = ExcelFile<"MultipleSheets.xlsx", SheetName="B">
@@ -41,12 +53,11 @@ Example
This example shows the use of the type provider in an F# script on a sheet containing three rows of data:
-
+
*)
// reference the type provider dll
-#r "ExcelProvider.dll"
open FSharp.Interop.Excel
// Let the type provider do it's work
@@ -55,4 +66,4 @@ let file = new DataTypesTest()
let row = file.Data |> Seq.head
let test = row.Float
(** And the variable `test` has the following value: *)
-(*** include-value: test ***)
\ No newline at end of file
+(*** include-value: test ***)
diff --git a/docs/content/headers.fsx b/docs/headers.fsx
similarity index 68%
rename from docs/content/headers.fsx
rename to docs/headers.fsx
index a8e8eea..056904a 100644
--- a/docs/content/headers.fsx
+++ b/docs/headers.fsx
@@ -1,5 +1,16 @@
+(**
+---
+title: Without Headers
+category: Documentation
+categoryindex: 2
+index: 6
+---
+*)
+
+
+
(*** hide ***)
-#I "../../bin/ExcelProvider"
+#r "../bin/ExcelProvider.Runtime/netstandard2.0/ExcelProvider.Runtime.dll"
(**
Without Headers
@@ -17,12 +28,12 @@ Example
This example shows the use of the type provider in an F# script on a sheet containing no headers:
-
+
*)
// reference the type provider dll
-#r "ExcelProvider.dll"
+#r "ExcelProvider.Runtime.dll"
open FSharp.Interop.Excel
// Let the type provider do it's work
@@ -31,4 +42,4 @@ let file = new DataTypesTest()
let row = file.Data |> Seq.head
let test = row.Column2
(** And the variable `test` has the following value: *)
-(*** include-value: test ***)
\ No newline at end of file
+(*** include-value: test ***)
diff --git a/docs/files/img/DataTypes.png b/docs/images/DataTypes.png
similarity index 100%
rename from docs/files/img/DataTypes.png
rename to docs/images/DataTypes.png
diff --git a/docs/files/img/DataTypesNoHeader.png b/docs/images/DataTypesNoHeader.png
similarity index 100%
rename from docs/files/img/DataTypesNoHeader.png
rename to docs/images/DataTypesNoHeader.png
diff --git a/docs/files/img/Excel.png b/docs/images/Excel.png
similarity index 100%
rename from docs/files/img/Excel.png
rename to docs/images/Excel.png
diff --git a/docs/files/img/MultSheets.png b/docs/images/MultSheets.png
similarity index 100%
rename from docs/files/img/MultSheets.png
rename to docs/images/MultSheets.png
diff --git a/docs/files/img/TypedExcel.png b/docs/images/TypedExcel.png
similarity index 100%
rename from docs/files/img/TypedExcel.png
rename to docs/images/TypedExcel.png
diff --git a/docs/files/img/logo-template.pdn b/docs/images/logo-template.pdn
similarity index 100%
rename from docs/files/img/logo-template.pdn
rename to docs/images/logo-template.pdn
diff --git a/docs/files/img/logo.png b/docs/images/logo.png
similarity index 100%
rename from docs/files/img/logo.png
rename to docs/images/logo.png
diff --git a/docs/content/index.fsx b/docs/index.fsx
similarity index 84%
rename from docs/content/index.fsx
rename to docs/index.fsx
index 0488ad9..f66f265 100644
--- a/docs/content/index.fsx
+++ b/docs/index.fsx
@@ -1,5 +1,5 @@
(*** hide ***)
-#I "../../bin"
+#r "../bin/ExcelProvider.Runtime/netstandard2.0/ExcelProvider.Runtime.dll"
(**
ExcelProvider
@@ -23,15 +23,13 @@ Example
This example demonstrates the use of the type provider:
-
+
*)
-
// reference the type provider dll
-#r "ExcelProvider.dll"
+#r "ExcelProvider.Runtime.dll"
open FSharp.Interop.Excel
-
// Let the type provider do it's work
type DataTypesTest = ExcelFile<"DataTypes.xlsx">
let file = new DataTypesTest()
@@ -41,7 +39,7 @@ let row = file.Data |> Seq.head
Now we have strongly typed access to the Excel rows:
-
+
*)
@@ -58,7 +56,7 @@ row.Boolean
Documentation
-----------------------
-For more information see the Documentation pages:
+For more information see the Documentation pages:
* [Getting Started](getting-started.html) contains an overview of the library.
* [Accessing Sheets](sheets.html) shows how to access different sheets in a workbook.
@@ -66,19 +64,19 @@ For more information see the Documentation pages:
* [Accessing Cells](cells.html) shows how to access individual cells within a row of a worksheet.
* [Accessing Ranges](ranges.html) shows how to access multiple ranges of data within a worksheet.
* [Without Headers](headers.html) shows how to process sheets which do not include headers.
-
+
Contributing and copyright
--------------------------
-The project is hosted on [GitHub][gh] where you can [report issues][issues], fork
-the project and submit pull requests. If you're adding new public API, please also
+The project is hosted on [GitHub][gh] where you can [report issues][issues], fork
+the project and submit pull requests. If you're adding new public API, please also
consider adding [samples][content] that can be turned into a documentation. You might
also want to read [library design notes][readme] to understand how it works.
-The library is available under Public Domain license, which allows modification and
-redistribution for both commercial and non-commercial purposes. For more information see the
-[License file][license] in the GitHub repository.
+The library is available under Public Domain license, which allows modification and
+redistribution for both commercial and non-commercial purposes. For more information see the
+[License file][license] in the GitHub repository.
[content]: https://github.com/fsprojects/ExcelProvider/tree/master/docs/content
[gh]: https://github.com/fsprojects/ExcelProvider
diff --git a/docs/content/ranges.fsx b/docs/ranges.fsx
similarity index 73%
rename from docs/content/ranges.fsx
rename to docs/ranges.fsx
index 720f482..2ff08de 100644
--- a/docs/content/ranges.fsx
+++ b/docs/ranges.fsx
@@ -1,5 +1,15 @@
+(**
+---
+title: Accessing Ranges
+category: Documentation
+categoryindex: 2
+index: 5
+---
+*)
+
+
(*** hide ***)
-#I "../../bin/ExcelProvider"
+#r "../bin/ExcelProvider.Runtime/netstandard2.0/ExcelProvider.Runtime.dll"
(**
Accessing Ranges
@@ -13,7 +23,7 @@ You can either specify this as the second parameter or the named `Range` paramet
Example
-------
-
+
This example demonstrates referencing multiple ranges:
@@ -32,4 +42,4 @@ let test1 = rows.[0].First
let test2 = rows.[0].Fourth
(** And the variables `test1` and `test2` have the following values: *)
(*** include-value: test1 ***)
-(*** include-value: test2 ***)
\ No newline at end of file
+(*** include-value: test2 ***)
diff --git a/docs/content/rows.fsx b/docs/rows.fsx
similarity index 65%
rename from docs/content/rows.fsx
rename to docs/rows.fsx
index afc184e..e7edaf5 100644
--- a/docs/content/rows.fsx
+++ b/docs/rows.fsx
@@ -1,5 +1,15 @@
+(**
+---
+title: Accessing Rows
+category: Documentation
+categoryindex: 2
+index: 3
+---
+*)
+
+
(*** hide ***)
-#I "../../bin/ExcelProvider"
+#r "../bin/ExcelProvider.Runtime/netstandard2.0/ExcelProvider.Runtime.dll"
(**
Accessing Rows
@@ -10,14 +20,14 @@ Rows are returned as a sequence from the `Data` element of the ExcelFile type.
Example
-------
-
+
This example demonstrates loading the second row (with index 1) into the variable test:
*)
// reference the type provider dll
-#r "ExcelProvider.dll"
+#r "ExcelProvider.Runtime.dll"
open FSharp.Interop.Excel
// Let the type provider do it's work
@@ -26,4 +36,4 @@ let file = new MultipleSheetsSecond()
let rows = file.Data |> Seq.toArray
let test = rows.[1]
(** And the variable `test` has the following value: *)
-(*** include-value: test ***)
\ No newline at end of file
+(*** include-value: test ***)
diff --git a/docs/content/sheets.fsx b/docs/sheets.fsx
similarity index 69%
rename from docs/content/sheets.fsx
rename to docs/sheets.fsx
index 7af92f4..3747bee 100644
--- a/docs/content/sheets.fsx
+++ b/docs/sheets.fsx
@@ -1,5 +1,16 @@
+(**
+---
+title: Accessing Sheets
+category: Documentation
+categoryindex: 2
+index: 2
+---
+*)
+
+
(*** hide ***)
-#I "../../bin/ExcelProvider"
+#r "../bin/ExcelProvider.Runtime/netstandard2.0/ExcelProvider.Runtime.dll"
+
(**
Accessing Sheets
@@ -12,14 +23,14 @@ If you do not include a second parameter then the first sheet in the workbook is
Example
-------
-
+
This example demonstrates referencing the second sheet (with name `B`):
*)
// reference the type provider dll
-#r "ExcelProvider.dll"
+#r "ExcelProvider.Runtime.dll"
open FSharp.Interop.Excel
// Let the type provider do it's work
@@ -28,4 +39,4 @@ let file = new MultipleSheetsSecond()
let rows = file.Data |> Seq.toArray
let test = rows.[0].Fourth
(** And the variable `test` has the following value: *)
-(*** include-value: test ***)
\ No newline at end of file
+(*** include-value: test ***)
diff --git a/docs/tools/generate.fsx b/docs/tools/generate.fsx
deleted file mode 100644
index 3273c4d..0000000
--- a/docs/tools/generate.fsx
+++ /dev/null
@@ -1,146 +0,0 @@
-// --------------------------------------------------------------------------------------
-// Builds the documentation from `.fsx` and `.md` files in the 'docs/content' directory
-// (the generated documentation is stored in the 'docs/output' directory)
-// --------------------------------------------------------------------------------------
-
-// Binaries that have XML documentation (in a corresponding generated XML file)
-// Any binary output / copied to bin/projectName/projectName.dll will
-// automatically be added as a binary to generate API docs for.
-// for binaries output to root bin folder please add the filename only to the
-// referenceBinaries list below in order to generate documentation for the binaries.
-// (This is the original behaviour of ProjectScaffold prior to multi project support)
-let referenceBinaries = []
-// Web site location for the generated documentation
-let website = "/ExcelProvider"
-
-let githubLink = "http://github.com/fsprojects/ExcelProvider"
-
-// Specify more information about your project
-let info =
- [ "project-name", "ExcelProvider"
- "project-author", "Steffen Forkmann, Gustavo Guerra, JohnDoeKyrgyz, Don Syme"
- "project-summary", "This library is for the .NET platform implementing a Excel type provider."
- "project-github", githubLink
- "project-nuget", "http://nuget.org/packages/ExcelProvider" ]
-
-// --------------------------------------------------------------------------------------
-// For typical project, no changes are needed below
-// --------------------------------------------------------------------------------------
-
-#load "../../packages/build/FSharp.Formatting/FSharp.Formatting.fsx"
-#I "../../packages/build/FAKE/tools/"
-#r "FakeLib.dll"
-open Fake
-open System.IO
-open Fake.FileHelper
-open FSharp.Literate
-open FSharp.MetadataFormat
-
-// When called from 'build.fsx', use the public project URL as
-// otherwise, use the current 'output' directory.
-#if RELEASE
-let root = website
-#else
-let root = "file://" + (__SOURCE_DIRECTORY__ @@ "../output")
-#endif
-
-// Paths with template/source/output locations
-let bin = __SOURCE_DIRECTORY__ @@ "../../bin"
-let content = __SOURCE_DIRECTORY__ @@ "../content"
-let output = __SOURCE_DIRECTORY__ @@ "../output"
-let files = __SOURCE_DIRECTORY__ @@ "../files"
-let templates = __SOURCE_DIRECTORY__ @@ "templates"
-let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/build/FSharp.Formatting/"
-let docTemplate = "docpage.cshtml"
-let fsi = FsiEvaluator()
-
-// Where to look for *.csproj templates (in this order)
-let layoutRootsAll = new System.Collections.Generic.Dictionary()
-layoutRootsAll.Add("en",[ templates; formatting @@ "templates"
- formatting @@ "templates/reference" ])
-subDirectories (directoryInfo templates)
-|> Seq.iter (fun d ->
- let name = d.Name
- if name.Length = 2 || name.Length = 3 then
- layoutRootsAll.Add(
- name, [templates @@ name
- formatting @@ "templates"
- formatting @@ "templates/reference" ]))
-
-// Copy static files and CSS + JS from F# Formatting
-let copyFiles () =
- CopyRecursive files output true |> Log "Copying file: "
- ensureDirectory (output @@ "content")
- CopyRecursive (formatting @@ "styles") (output @@ "content") true
- |> Log "Copying styles and scripts: "
-
-let binaries =
- let manuallyAdded =
- referenceBinaries
- |> List.map (fun b -> bin @@ b)
-
- let conventionBased =
- directoryInfo bin
- |> subDirectories
- |> Array.map (fun d -> d.FullName @@ (sprintf "%s.dll" d.Name))
- |> List.ofArray
-
- conventionBased @ manuallyAdded
-
-let libDirs =
- let conventionBasedbinDirs =
- directoryInfo bin
- |> subDirectories
- |> Array.map (fun d -> d.FullName)
- |> List.ofArray
-
- conventionBasedbinDirs @ [bin]
-
-// Build API reference from XML comments
-let buildReference () =
- CleanDir (output @@ "reference")
- MetadataFormat.Generate
- ( binaries, output @@ "reference", layoutRootsAll.["en"],
- parameters = ("root", root)::info,
- sourceRepo = githubLink @@ "tree/master",
- sourceFolder = __SOURCE_DIRECTORY__ @@ ".." @@ "..",
- publicOnly = true,libDirs = libDirs )
-
-// Build documentation from `fsx` and `md` files in `docs/content`
-let buildDocumentation () =
-
- // First, process files which are placed in the content root directory.
-
- Literate.ProcessDirectory
- ( content, docTemplate, output, replacements = ("root", root)::info,
- layoutRoots = layoutRootsAll.["en"], fsiEvaluator = fsi,
- generateAnchors = true,
- processRecursive = false)
-
- // And then process files which are placed in the sub directories
- // (some sub directories might be for specific language).
-
- let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.TopDirectoryOnly)
- for dir in subdirs do
- let dirname = (new DirectoryInfo(dir)).Name
- let layoutRoots =
- // Check whether this directory name is for specific language
- let key = layoutRootsAll.Keys
- |> Seq.tryFind (fun i -> i = dirname)
- match key with
- | Some lang -> layoutRootsAll.[lang]
- | None -> layoutRootsAll.["en"] // "en" is the default language
-
- Literate.ProcessDirectory
- ( dir, docTemplate, output @@ dirname, replacements = ("root", root)::info,
- layoutRoots = layoutRoots, fsiEvaluator = fsi,
- generateAnchors = true )
-
-// Generate
-copyFiles()
-#if HELP
-buildDocumentation()
-#endif
-#if REFERENCE
-buildReference()
-#endif
diff --git a/docs/tools/templates/template.cshtml b/docs/tools/templates/template.cshtml
deleted file mode 100644
index 0b2527a..0000000
--- a/docs/tools/templates/template.cshtml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
- @Title
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-