Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin kotynia committed Jul 17, 2017
1 parent acc03fe commit 889575c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 25 deletions.
8 changes: 4 additions & 4 deletions ExcelToHtml.console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static void Main(string[] args)
#if DEBUG //TEST DATA
var testdata = new List<string>{
@"-t=c:\git\ExcelToHtml\Test\test1.xlsx",
@"-data=https://transit.land//api/v1/changesets/1/change_payloads"
@"-data=https://transit.land//api/v1/changesets/1/change_payloads"
};
args = testdata.ToArray();
#endif
Expand Down Expand Up @@ -91,11 +91,11 @@ static void Main(string[] args)
Console.WriteLine(" File Saved {0}", HtmlPath);
File.WriteAllText(HtmlPath, html);

#if DEBUG //TEST
#if DEBUG //DEBUG MODE
Console.ReadKey();
#endif

#if !DEBUG
#if !DEBUG //DEBUG MODE
}
catch (Exception ex)
{
Expand Down Expand Up @@ -137,4 +137,4 @@ private static Dictionary<string, string> ResolveArguments(string[] args)
}

}
}
}
43 changes: 22 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ Excel To HTML Library and Console Application
- Support for Functions ( https://epplus.codeplex.com/wikipage?title=Supported%20Functions&referringTitle=Documentation )
- Optional INPUT/OUTPUT dataset (console application)

## Road Map (next versions)
- List<> to Excel Range
- code cleanup

# Getting Started

## ExcelToHtml.dll, Nuget Package https://www.nuget.org/packages/ExcelToHtml
Expand All @@ -25,31 +21,16 @@ Basic

```c#
FileInfo newFile = new FileInfo(fullPath);
var WorksheetHtml = new ExcelToHtml.ToHtml(ExcelFile);
var WorksheetHtml = new ExcelToHtml.ToHtml(ExcelFile);
string html = WorksheetHtml.Convert();

//Optional set custom style for table
//WorksheetHtml.TableStyle =" " ; default "border-collapse: collapse;font-family: helvetica, arial, sans-serif;";
//Optional Get Set Cells
//Dictionary<string, string> InputOutput = new Dictionary<string, string>();
//InputOutput.Add("A1", "Hello World"); //set hello world
//InputOutput.Add("A2", "=2+1"); //set formula
//InputOutput.Add("[[TemplateField]]", "HelloTemplate"); //FillTempalte Field
//InputOutput.Add(".A2", null); //Output value form A2
//var output = WorksheetHtml.GetSetCells(InputOutput); //Output
```

Advanced
ExcelToHtml as calculation engine

```c#
FileInfo newFile = new FileInfo(fullPath);
var WorksheetHtml = new ExcelToHtml.ToHtml(ExcelFile);

//Optional set custom style for table
WorksheetHtml.TableStyle =" " ; default "border-collapse: collapse;font-family: helvetica, arial, sans-serif;";

//Optional Get Set Cells
Dictionary<string, string> InputOutput = new Dictionary<string, string>();
InputOutput.Add("A1", "Hello World"); //set hello world
Expand All @@ -61,6 +42,26 @@ var output = WorksheetHtml.GetSetCells(InputOutput); //Output
string html = WorksheetHtml.Convert();
```

ExcelToHtml data from url (JSON)

```c#
FileInfo newFile = new FileInfo(fullPath);
var WorksheetHtml = new ExcelToHtml.ToHtml(ExcelFile);
WorksheetHtml.debug = true;
WorksheetHtml.DataFromUrl("http://nflarrest.com/api/v1/crime");
string html = WorksheetHtml.Convert();
```

ExcelToHtml data from object

```c#
FileInfo newFile = new FileInfo(fullPath);
var WorksheetHtml = new ExcelToHtml.ToHtml(ExcelFile);
DataFromObject(object data); //Your Object
string html = WorksheetHtml.Convert();
```



## ExcelToHtml.console.exe, Download https://github.com/marcinKotynia/ExcelToHtml/releases

Expand Down

0 comments on commit 889575c

Please sign in to comment.