Skip to content
/ cs Public

Dotnet tutorial with packages, console arguments, sql to Excel97

Notifications You must be signed in to change notification settings

rezonn/cs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C# console SQL to Excel

  • Install dotnet
  • Open cmd. Goto desktop
cd %UserProfile%\Desktop
  • Create new console project "ww", run it
dotnet new console -o ww
cd ww
dotnet run
  • Replace Program.cs
  • Add package "System.Data.OleDb" to project
dotnet add package System.Data.OleDb
  • Microsoft.Jet.OLEDB requred 32bit mode, and console arguments ("xsl" and "sql"):
dotnet run -r win-x86 -- -xsl "C:\\Path\\to\\data.xls" -sql "SELECT * FROM names"
  • Compile to "Compiled" folder
dotnet publish -r win-x86 -p:PublishSingleFile=true --self-contained=true -p:PublishTrimmed=true --output ./Compiled
  • Run it
cd Compiled
ww -xsl "C:\\Path\\to\\data.xls" -sql "SELECT * FROM names"

Note

  • Sublime 2 build
{
	"cmd": ["dotnet", "run"],
	"encoding": "cp866"
}
%windir%\SysWOW64\odbcad32.exe 

About

Dotnet tutorial with packages, console arguments, sql to Excel97

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages