Skip to content

Instantly share code, notes, and snippets.

@wgx
Created March 10, 2019 10:01
Show Gist options
  • Save wgx/3b8fe66e69a3892ea68ddad3c3e3dcbc to your computer and use it in GitHub Desktop.
Save wgx/3b8fe66e69a3892ea68ddad3c3e3dcbc to your computer and use it in GitHub Desktop.
SQLizer .NET API Client example code

To convert a file, use to the SQLizerFile object, like this:

SQLizerClient.Settings.ApiKey = "{your api key}"; // This can be found on https://sqlizer.io/account/

var file = new SQLizerClient.SQLizerFile("source.xlsx");

file.DatabaseType = SQLizerClient.DatabaseType.MySQL;
file.TableName = "my_table";
file.HasHeaders = true;
file.SheetName = "Sheet1";
file.CellRange = "A1:C99";
file.CheckTableExists = true;
file.InsertSpacing = 250;

await file.SaveResultAsync("destination.sql");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment