C# Tutorial - How to Export DataGridView To Excel File | FoxLearn

  Рет қаралды 74,792

Fox Learn

Fox Learn

Күн бұрын

Пікірлер: 92
@michalismichael7666
@michalismichael7666 4 жыл бұрын
Can you make an example for export database table to excel using C# (ClosedXML)
@boborahimyuldashev9346
@boborahimyuldashev9346 3 жыл бұрын
Hello teacher. I don’t want to explore the DataGridView features: please. Thank you so much
@damionreid3164
@damionreid3164 8 жыл бұрын
Awesome. was able to successfully integrate this to my existing vb code
@foxlearn
@foxlearn 8 жыл бұрын
Thank you :)
@DavidHays205
@DavidHays205 8 жыл бұрын
Awesome. Thanks for uploading these!
@foxlearn
@foxlearn 8 жыл бұрын
Thanks :)
@DavidHays205
@DavidHays205 8 жыл бұрын
Can you take a look at my code and see what I am doing wrong? Once the save dialog opens and I hit save it just closes and does not create a new file.... github.com/Flyhalf205/CallLog
@geminian091
@geminian091 6 жыл бұрын
In my case i am getting error in it when we are loading form using database db with data source and ToList() thing . An unhandled exception of type 'System.ArgumentException' occurred in System.Data.Entity.dll Additional information: The specified store provider cannot be found in the configuration, or is not valid. Kindly help how to sort out. Thanks
@انامسلموكفى
@انامسلموكفى 5 жыл бұрын
how i can check if the Sheet i empty or not . i ve used the Excelreader thak you so much
@foxlearn
@foxlearn 5 жыл бұрын
Do you want to check data in sheet? is that right?
@hafizoktri3847
@hafizoktri3847 5 жыл бұрын
I followed all your steps and instruction but nothing is working after the Save As dialog is closed. any idea?
@foxlearn
@foxlearn 5 жыл бұрын
Please check your code again. i think you missing something. Thank you !
@pantrapan3995
@pantrapan3995 8 жыл бұрын
Хотелось бы увидеть отчеты с использованием ReportViewer :D
@foxlearn
@foxlearn 8 жыл бұрын
Thank you for your suggestion :)
@TopVideos.Talent
@TopVideos.Talent 2 жыл бұрын
why can't you open it directly with excel? There comes message yes or no in excel
@alannunez3999
@alannunez3999 6 жыл бұрын
Hi! I can't see the table I called from my DataBase in the "model.edmx" Help please!!
@gastonramirez2634
@gastonramirez2634 8 жыл бұрын
Very good this video!!!!
@foxlearn
@foxlearn 8 жыл бұрын
Thank you
@thanhlecotuong4813
@thanhlecotuong4813 5 жыл бұрын
thank you very much :)
@foxlearn
@foxlearn 5 жыл бұрын
You're welcome. Thank you !
@punzalanmichael9697
@punzalanmichael9697 6 жыл бұрын
i got an error using the name Interop. in Microsoft.Office.Interop.Excel. please help. how to fix. Thank You. :D
@foxlearn
@foxlearn 6 жыл бұрын
Please add a reference to Microsoft.Office.Interop.dll
@punzalanmichael9697
@punzalanmichael9697 6 жыл бұрын
@@foxlearn now that i fix the interop error. now the name "Application" in Microsoft.Office.Interop.Excel.Application is error. i search on how to fix it but i got a lot of new error. please help
@punzalanmichael9697
@punzalanmichael9697 6 жыл бұрын
Severity Code Description Project File Line Suppression State Error CS0433 The type 'Application' exists in both 'Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' and 'Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
@punzalanmichael9697
@punzalanmichael9697 6 жыл бұрын
nevermind hahah i already fix it :D thanks by the way
@foxlearn
@foxlearn 6 жыл бұрын
That's great. Thank you my friend !
@singhsahab8117
@singhsahab8117 4 жыл бұрын
Please give me guide how i make sum of data grid column value
@foxlearn
@foxlearn 4 жыл бұрын
OK. Thank you for your suggestion. I'll upload soon !
@singhsahab8117
@singhsahab8117 4 жыл бұрын
@@foxlearn thanks One more how add item in combobox using access data in visual basic if recently uploaded this kind video then please provide link Thanks
@sakrkokymohamed3049
@sakrkokymohamed3049 5 жыл бұрын
I have this error "System.NullReferenceException: 'Object reference not set to an instance of an object.' list was null." in this step int process = list.Count;
@foxlearn
@foxlearn 5 жыл бұрын
Please check your code again. i think you miss something
@sakrkokymohamed3049
@sakrkokymohamed3049 5 жыл бұрын
private void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e) { List list = ((DataPrameter)e.Argument).tblMasrofs; string fileName = ((DataPrameter)e.Argument).fileName; Microsoft.Office.Interop.Excel.Application execl = new Microsoft.Office.Interop.Excel.Application(); Workbook wp = execl.Workbooks.Add(XlSheetType.xlWorksheet); Worksheet ws = (Worksheet)execl.ActiveSheet; execl.Visible = false; int index = 1; //if ((list != null) && (!list.Any())) //{ int process = list.Count; ws.Cells[1, 1] = "price"; ws.Cells[1, 2] = "date"; ws.Cells[1, 3] = "masrof"; foreach (tblMasrof p in list) { if (!backgroundWorker.CancellationPending) { backgroundWorker.ReportProgress(index++ * 100); ws.Cells[index, 1] = p.price.ToString(); ws.Cells[index, 2] = p.date.ToString(); ws.Cells[index, 2] = p.masrof.ToString(); } } // Add new item // list.Add(list.Count""); //}       ws.SaveAs(fileName, XlFileFormat.xlWorkbookDefault, Type.Missing, Type.Missing, true, false, XlSaveAsAccessMode.xlNoChange, XlSaveConflictResolution.xlLocalSessionChanges, Type.Missing, Type.Missing); execl.Quit();   }
@Videoman2102
@Videoman2102 3 жыл бұрын
2:42 why my table didn't appear?
@nachiketsg7116
@nachiketsg7116 7 жыл бұрын
Hi, I am using SQL Data Adapter for getting values in data grid view. Below is my sample code. But when I am using your code for exporting it is not working. can you please tell me what are the changes required? SqlConnection con = new SqlConnection(); con.ConnectionString = "Data Source=SINDT0271;Initial Catalog=3032017_RDB;Integrated Security=True"; con.Open(); //PipingCommodityFilter SqlDataAdapter PCFsda = new SqlDataAdapter("SELECT * From Table); DataTable PCFdt = new DataTable(); PCFsda.Fill(PCFdt); metroGrid1.DataSource = PCFdt;
@madoubar5346
@madoubar5346 6 жыл бұрын
I do not appreciate this video, because you did it so quickly that is extremely difficult to understand how do you did it. Your curse urges is not controlled. Thank you for your time but it's not helpfully.
@hmamoun
@hmamoun 5 жыл бұрын
I agree that it is a bit fast, but this is a plus, I paused the video to follow, however, it would be useful to include the source code
@kevinmungame1869
@kevinmungame1869 3 жыл бұрын
No one understood what you are doing. What's the purpose of the video, everyone is asking for source code???
@foxlearn
@foxlearn 3 жыл бұрын
Export data to excel
Creating Excel Files in C#
55:42
IAmTimCorey
Рет қаралды 128 М.
黑的奸计得逞 #古风
00:24
Black and white double fury
Рет қаралды 28 МЛН
А что бы ты сделал? @LimbLossBoss
00:17
История одного вокалиста
Рет қаралды 11 МЛН
Сюрприз для Златы на день рождения
00:10
Victoria Portfolio
Рет қаралды 2,7 МЛН
啊?就这么水灵灵的穿上了?
00:18
一航1
Рет қаралды 99 МЛН
C# - How to Export DataGridView Data to Ms Excel File in Visual C#
7:57
All useEffect Mistakes Every Junior React Developer Makes
22:23
C# DataGridView Pagination | Windows Form Application
11:24
Ka-Dev Tips
Рет қаралды 1,9 М.
C# Tutorial - Import data from Excel to SQL Server | FoxLearn
21:40
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 209 М.
M4 Mac mini - 10 MAJOR Reasons to Upgrade!
10:08
Max Tech
Рет қаралды 24 М.
Export DataGridView To Excel In c# Windows Application Step By Step
12:17
How computer processors run conditions and loops
17:03
Core Dumped
Рет қаралды 138 М.
Экспорт в Excel - два способа
13:06
c# учимся вместе
Рет қаралды 8 М.
黑的奸计得逞 #古风
00:24
Black and white double fury
Рет қаралды 28 МЛН