No video

Creating Excel Files in C#

  Рет қаралды 126,264

IAmTimCorey

IAmTimCorey

Күн бұрын

Пікірлер: 342
@byoungmn
@byoungmn 7 ай бұрын
My 11y/o granddaughter wants to try one of your courses, been working with her on her own personal phone book. I'm glad your still doing this, I just wouldn't have the time to put all this together for her. Keep up the good work! Worth every penny, and every minute...
@IAmTimCorey
@IAmTimCorey 7 ай бұрын
Great!
@justindehorty
@justindehorty 3 жыл бұрын
Favorite quotes from this episode: 03:14 "If you're using it for commercial purposes you should be paying for it. That's what they have required, and I definitely support their desire to eat." 09:51 "First Name Equals...uh, not Japanese Calendar..." Thanks for this video, Tim; you do a wonderful job keeping the content engaging.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Just keeping it real
@rushas
@rushas 2 жыл бұрын
I wish I could like this video multiple times. There are so many tips and pro tricks, plus the well structured tutorial, making it an amazing source of information. Great video, thank you very much!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are most welcome. Thanks for watching.
@Ellen461
@Ellen461 3 жыл бұрын
Best c# instructor.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks!
@chewangyolmoo4628
@chewangyolmoo4628 3 жыл бұрын
Just what I was currently working on.
@ralofpatel470
@ralofpatel470 3 жыл бұрын
Even me. I was just discussing about excel and its requirment in Bigdata companies
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Great!
@turn1210
@turn1210 3 жыл бұрын
Same
@markmahowald7866
@markmahowald7866 3 жыл бұрын
Oh man, where were you with this video 3 months ago when this was my project at work!? joking aside, thank you! You implemented this in a way cleaner way than I was able to and I'm going to be stealing a fair number of your methods
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad I could help!
@stanleyjekwu6810
@stanleyjekwu6810 Жыл бұрын
Thanks a lot Tim, this video helped me to carryout a task for my company. Thanks
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@RalfsBalodis
@RalfsBalodis 3 жыл бұрын
0:00 - Intro 0:58 - Creating Demo Console App 2:40 - EPPlus NuGet reference and terms of use 4:56 - Building demo app: C# code 7:00 - Saving to excel file: data model, async methods 15:41 - Saving to excel file: using statement 19:40 - Saving to excel file 26:56 - Styling the excel cells 35:55 - Note on created excel files: metadata 39:21 - Read from excel file 51:15 - Summary and concluding remarks I hope these time codes are helping to grow this channel!
@noijze
@noijze 3 жыл бұрын
Would be great if Tim did include these by default
@RalfsBalodis
@RalfsBalodis 3 жыл бұрын
@@noijze I've heard hat is impossible. I partially agree though. I might miss something to point out or may not have best description for the chapter title. On the other hand, I like to share my notes with others :) @IAmTimCorey Hey, Tim. If you have prepared a list of topics you gonna talk about in video, you could just use some kind of stopwatch to keep track of times when you switch to the new topic... I know it will add time to your video post editing, but I believe that you said it takes you only 3 minutes anyway... Just think about it?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks again Ralfs. The issue with adding them myself has to do with timing. It seems simple to keep track of my timecodes, but the problem is the editing process. When I create a lesson, I don't strictly follow an outline. So, I would need to record that outline on the fly (or at least the parts that deviated from my rough outline). Then I would need to record the timecode for when I start the topic. That would mean breaking my train of thought in order to record the timestamp and what I'm getting into. Then, I would need to adjust all of those timestamps. You see, when I record, I start with about 10 seconds of silence at the beginning. This allows me to later remove the background noise of the room by training the system to know what silence sounds like. This means that all of my timecodes would now be off by about ten seconds. All of that would mean producing videos more slowly. That, in turn, leads to less content. For now, I've chosen to leave off the timecodes in order to speed up the process significantly. Eventually, I will have enough work to pay an editor to handle my videos full-time. In that case, adding timecodes will be part of their job. That way I can still produce videos at a reasonable speed while also providing more value to the viewer. That's part of what the paid content is helping to fund (or will help once we get to that level).
@luckyJYK
@luckyJYK 3 жыл бұрын
Hey Tim.. I guess you've just answered one of my wish list. In fact, I just mentioned this in your last video (TimCo Phase3 Planning) then this video arrived. Appreciate it Tim!!! Wish you have a nice day.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are most welcome. Thanks for watching.
@janne_kekalainen
@janne_kekalainen 3 жыл бұрын
1. C# 7.1 for async Main 2. using directive vs. using statement.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks for sharing.
@NBGTFO
@NBGTFO 3 жыл бұрын
You can use EPPlus versions prior to 5.0 for free since older versions are still under the old, more open license.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Great tip!
@JohnPeter-yf5jf
@JohnPeter-yf5jf 3 жыл бұрын
Like IText and WPFToolKit, but those were v4.0 they changed them.
@Rexter2k
@Rexter2k 3 жыл бұрын
Came here to write the same. Only version 5 and forward are under their new commercial license. If you use any version before v5, you are free to use it in commercial products.
@raeesg
@raeesg 3 жыл бұрын
The downside is, the SaveAsync ability is not available in pre-5.0 :(
@discbrakefan
@discbrakefan 3 жыл бұрын
Been using GemBox Spreadsheet for years for OpenXML (Excel) spreadsheet files. Works really well. Has a free and paid option depending on complexity and size of the file.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Interesting, thanks for sharing.
@blo0m1985
@blo0m1985 Жыл бұрын
keep going, Man. Your way of explanation just as it should be.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Thanks!
@bartekbratus7415
@bartekbratus7415 3 жыл бұрын
Pro tip from me when reading data from excel. The more universal way to read any value, doesn't matter the type is to use "ws.GetValue(row, col);"
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks for sharing your perspective.
@rtrs5413
@rtrs5413 11 ай бұрын
Tim you are the best pro teacher
@IAmTimCorey
@IAmTimCorey 11 ай бұрын
Thank you!
@rtrs5413
@rtrs5413 11 ай бұрын
@@IAmTimCorey Tim I have a doubt is wpf and webforms same?what makes them different?
@IAmTimCorey
@IAmTimCorey 11 ай бұрын
No, they are entirely different. WinForms uses C# for UI placement, although you use drag-and-drop with a visual builder to actually place the items. WPF uses XAML for its layout and drag-and-drop is discouraged because it does not take advantage of the strengths of WPF (responsive layouts).
@rtrs5413
@rtrs5413 11 ай бұрын
@@IAmTimCorey actually I am asking about webforms Tim not winforms
@IAmTimCorey
@IAmTimCorey 11 ай бұрын
Webforms is a completely different thing from WPF. Webforms is a web application. WPF is a desktop application. Webforms is no longer getting updates and only works in the .NET Framework. WPF works in the latest version of .NET (and in every previous version).
@NoGamer256
@NoGamer256 3 жыл бұрын
I've seen my coworkers use interop to write to excel, well not good idea mind you. I replaced most of it with ClosedXML. But I think EPPlus is even better when you work on open source.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
It is a great option.
@troymitchel4790
@troymitchel4790 3 жыл бұрын
Curious, why do you need this when you can just connect to the excel object and do whatever you want? You can use Office.Interop or just the excel object without interop.
@logato7128
@logato7128 3 жыл бұрын
I use interop all the time! I prefer native myself but Tim’s videos often substitute packages.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You can't use interop without Excel being installed. That is a problem when you go to use it in production. You don't want a dependency on Excel, especially if your web server is the one generating the files.
@troymitchel4790
@troymitchel4790 3 жыл бұрын
I just swapped out Office.Interop.Excel with "Object" for production and it works great. Had to do this with a few applications for reports. Once you do that though, you lose intellisense. This is the free route, maybe not the best. :)
@albe8479
@albe8479 3 жыл бұрын
if your company has the money to have excel installed on a production server, they also have the money to purchase the commercial license of EPPlus. My company is so poor that they dropped office and went for libreoffice
@TurntableTV
@TurntableTV 3 жыл бұрын
Hey Tim! Nice video, as always. Related to this, any thoughts on ClosedXML and why would I choose EPPlus over it?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I prefer the richness of the features of EPPlus but if ClosedXML works for your needs then go for it.
@sergestevens6034
@sergestevens6034 3 жыл бұрын
Hi Tim, another great video as always. But I never thought I would see the day when you left a "bug" in your code. Using FileInfo to load the Excel file keeps it in use until your application is finished. You can read from it and can write to it but you can't delete of move it. Using FileStream ( even with OpenRead ) does free the file. No big deal for this demo but in real live this may be a problem. Only found myself when I tried to delete the file from the code ( and it took me some time to find the reason ).
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Yep. The way I treated this application was as a whole. In a real application, I would take what I did here and put it all behind one method. Then the file would be released when the method is complete.
@OldCumbria
@OldCumbria 3 жыл бұрын
Many thanks for this tutorial; it's enabled me to create an easy report.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Excellent! That is Tim's goal!
@ivantut9210
@ivantut9210 Жыл бұрын
Tim! Thank you for useful video. It was really helpful for my styding.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@pioleonardo
@pioleonardo Жыл бұрын
In 31:41, ws.Row(1).Style.Font.Color.SetColor(Color.Blue); it worked when I added using System.Drawing; on the top of the code :)
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Thanks for sharing!
@MahmoudBakkar
@MahmoudBakkar 3 жыл бұрын
What a great video, I might have some suggestions on reading from an Excel file but let try them first.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Several folks have shared tips and we welcome yours also.
@kevinmungame1869
@kevinmungame1869 3 жыл бұрын
Thank you Tim, that was a great tutorial. Answered most of the questions.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@kevinmungame1869
@kevinmungame1869 3 жыл бұрын
@@IAmTimCorey Hi, I have been stack for a month now, how can I display a product card with image, name, and price in winforms app? Is it possible?
@aritrapaul1418
@aritrapaul1418 4 ай бұрын
Thanks bro for saving my job
@IAmTimCorey
@IAmTimCorey 4 ай бұрын
You are welcome.
@bobpond6381
@bobpond6381 3 жыл бұрын
First once again, really great content in addition to the primary topic in your “using” commentary. Just terrific stuff there. I’ve done probably hundreds of operational reports accessed via web API endpoints that returned operational reports in excel. ClosedXML has worked so far but looking at this other package if it doesn’t handle what I need going forward. I have also always found recording macros in excel to do what I need a great way to find what excel wants to to what you want.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Much appreciated! Thanks for sharing your approaches.
@pierreplourde
@pierreplourde 2 жыл бұрын
I see the possibilités! Data entry and reporting as you point out, but also a data storage solution between databases and CSV/text files.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Yep.
@princepabari6479
@princepabari6479 2 жыл бұрын
very helpful sir, Thank you !!🙌
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@andywalter7426
@andywalter7426 3 жыл бұрын
One topic I would love to see covered and even have a full course would be source generators. There are lots of good things that can come from it. Would love to first see a most simple one, then move on to more advanced ones and even how to debug them. I read that using source generators can really help on performance since reflection is unfortunately too slow.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I will add it to the list. Thanks for the suggestion.
@YoungMetroid
@YoungMetroid 3 жыл бұрын
You can use the EPPlus version 4 and that version is free to use for commercial use and its still really good
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks for the tip.
@MihaiStefanuti
@MihaiStefanuti 6 ай бұрын
I am working in Blazor, and was trying to implement this on the client side instead of the server. (result: no file was created) Thanks for pointing that out!
@IAmTimCorey
@IAmTimCorey 6 ай бұрын
I’m glad it was helpful.
@jimlynch8313
@jimlynch8313 3 жыл бұрын
This and DocX are my reporting bread and butter. Makes life so easy. (Edit: Also CsvHelper ^^ )
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Great!
@joshibhushan1
@joshibhushan1 Жыл бұрын
Thanks for this video. I was not aware of the .xlsx format. The information you mentioned in 35:00 - 39:00 was new to me and got excited to learn that. I must say I not only watch you videos but also go through the comments without fail. I must say that your viewers are also genuine knowledge lovers and I always love to read the comments in your video plus your responses. Can you please make one video for handling AppSetting or Environment variables in the projects. With Transition to dotnet core I would like to know your take on that as well. Thanks once again and best wishes !!!
@IAmTimCorey
@IAmTimCorey Жыл бұрын
I think this is what you are looking for: kzbin.info/www/bejne/lWPCop6pmbZ-eac I'm glad you enjoy my content.
@2aguy594
@2aguy594 4 ай бұрын
I am having problem with other examples using Microsoft.Office...... and it not wanting to save the file when adding a Record to it. And i am wondering if this will save the file after i add a New record/data to an excel file.
@retrorimos5841
@retrorimos5841 3 жыл бұрын
Thank you so much for all those tutorials.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@ibrahimfarah738
@ibrahimfarah738 3 жыл бұрын
Great tutorial really very useful, can you make tutorial for generating pdf files in C#
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I will add it to the list. Thanks for the suggestion.
@codingwithgyver1637
@codingwithgyver1637 3 жыл бұрын
Now watching and looking for ideas to utilize more features of Excel and same time, cleaner code pattern of it :D
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Great!
@oresteromano4920
@oresteromano4920 Жыл бұрын
Very useful, thanks so much!!!
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@kalyant4729
@kalyant4729 2 жыл бұрын
Interop or epplus which should i go for updating to office 365 in by C# code in vs
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
I would lean away from Interop. That's a messy system to try to support, especially when there are better options out there like EPPlus and Syncfusion.
@DoubledEthan
@DoubledEthan 3 жыл бұрын
Thank you so much! well explained, high quality videos as always. you are the best :D
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad you like them!
@ahmadjalali7587
@ahmadjalali7587 Жыл бұрын
Thank you very much teacher
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@sundarraaj2944
@sundarraaj2944 2 жыл бұрын
I need two headers and some headers will contain the same column name .. How can i do that ?
@VincentDBlair
@VincentDBlair 2 жыл бұрын
Any talk about an Excel 2022 that has VBA fully replaced by C#? Thanks
@brandonparkinson3924
@brandonparkinson3924 3 жыл бұрын
Great video Tim, thanks for this!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
My pleasure!
@gennadiigomeniuk5002
@gennadiigomeniuk5002 3 жыл бұрын
Hi Tim. Do you plan to make a video on outputting data to MS Word? Thanks for good example! EPPlus is my favorite Excel library.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Possibly. It is on the suggestion list.
@appwajih
@appwajih 3 жыл бұрын
Please Do With Creating PDF as well thanks
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I will add it to the list. Thanks for the suggestion.
@andywalter7426
@andywalter7426 3 жыл бұрын
@@IAmTimCorey I too would love creating pdf. Several years ago, i paid somebody 3000 dollars to convert from html to pdf but that only works with the old .net framework. I would guess a person would have to have something created for .net core that would cost 1000's of dollars.
@andywalter7426
@andywalter7426 3 жыл бұрын
One really good reporting solution actually that is completely free is blazor server side. I have found blazor server side the easiest and the most flexible for reporting. Its so easy to create sample components and pages that its so easy to create reporting solutions with blazor server side.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I agree, check out some of my videos on Blazor here - kzbin.infosearch?query=blazor
@andywalter7426
@andywalter7426 3 жыл бұрын
@@IAmTimCorey I actually watched all your blazor videos. I discovered there is much more you can do with blazor than even in your videos. I even created my own combo box in blazor and even have a custom mediaquerylist so for different screens, it can adjust whether its portrait or landscape or can change whether its running on different form factors like phones, tablets, etc.
@TheBausahab
@TheBausahab 3 жыл бұрын
Ah!...saved my soul.. thank you sir..thank you very much
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Happy to help
@richardshi1896
@richardshi1896 3 жыл бұрын
Very useful topic. Thanks
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome
@OZVID
@OZVID 3 жыл бұрын
Hi I'm trying below in C# to format a range in excel, I don't know what's wrong with that. Range.ReadingOrder = xlContext; Can you help me please
@LilPozzer
@LilPozzer 3 жыл бұрын
Nice video, sir!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks!
@sangnguyen5031
@sangnguyen5031 3 жыл бұрын
Love your C#.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks
@user-ti7zu7wz5e
@user-ti7zu7wz5e 2 жыл бұрын
Any suggestion on free tools for generating spreadsheets?
@jeremiahsease5784
@jeremiahsease5784 Жыл бұрын
How do you get those tags? That would help so much with guidance.
@derrarmouradriad9157
@derrarmouradriad9157 3 жыл бұрын
hello sir althought i tried this but i have an error message saying incorrect INPUT .i tried comparing it to the source code and it was almost identical .i changed var names only and created a class to handle the file ..... i am using a winFORM Please Help me if possible
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I'm not sure what the problem is, but there is something not right. Walk through it step by step. Review all of the code. Try changing small bits to get it to work.
@johnpintocarvajal9991
@johnpintocarvajal9991 3 жыл бұрын
Thanks Tim, great video. I was just wondering how do you get those little tags inside functions that tells you what the argument is (like "printheaders")? Thanks
@johnpintocarvajal9991
@johnpintocarvajal9991 3 жыл бұрын
Just found the answer in previous comement by Tim : " Here is the video (and timecode) where I explain how to use it: kzbin.info/www/bejne/nGG8lomfp7CDnNk "
@alvernepaiva3287
@alvernepaiva3287 11 ай бұрын
One question. Lets say I want to create a button just like the ones we create with the internal VBA that excels provide by linking an macro in there to a form we input in the excel file. How would we do that with the macros we created with c# with VS?
@peanuttime
@peanuttime 7 ай бұрын
Hi Tim, I have a question, when I auto complete the statement there is no “address:” in grey color show up, how I can get this feature. Thanks you a lot
@IAmTimCorey
@IAmTimCorey 7 ай бұрын
Here is a video on how to turn that on: kzbin.info/www/bejne/o6DVc36nqdagqdEsi=gnzzHX_qCr0eMq5u
@peanuttime
@peanuttime 7 ай бұрын
@@IAmTimCorey You are the best, it helps me reading C# Robot Code easily
@giaco7572
@giaco7572 Жыл бұрын
Why are we not working with Office interop objects ? That seems like the more native way, doesn't it ?
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Couple of reasons - first, interop is messy. Second, in order to generate an Excel file using interop, you need to have Excel installed on the machine that is generating the file. In my example, it is clean, easy, and does not require Excel to be installed on the machine running the code.
@NicholasStein
@NicholasStein 3 жыл бұрын
In one of your videos a while back you talked about getting the community edition of Syncfusion (Blazor). I have used EPP in the past and found the Syncfusion XlsIO library much easier to use, richer and faster.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks for sharing!
@YoungMetroid
@YoungMetroid 3 жыл бұрын
I've used Npoi and EPPlus and i would say that EPPlus is the better option. I dont know about ClosedXml since i personally have never used it but i've heard it has issues regarding file sizes just like Npoi does which is why i switched to EPPlus which is able to read excel files that are over 15 mb
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks for sharing.
@radeksendecki9922
@radeksendecki9922 3 жыл бұрын
Thank you Tim, that was really clearly presented. I thought reading from Excel will be easier. I have lot of whitespaces in my Excel so I use this method to count rows: private int GetLastUsedRow(ExcelWorksheet sheet) { if (sheet.Dimension == null) { return 0; } // In case of a blank sheet var row = sheet.Dimension.End.Row; while (row >= 1) { var range = sheet.Cells[row, 1, row, sheet.Dimension.End.Column]; if (range.Any(c => !string.IsNullOrEmpty(c.Text))) { break; } row--; } return row; } I tried just: int rowCnt = sheet.Dimension.End.Row; But my loop ended faster than I want.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Thanks for sharing
@abdelkiki
@abdelkiki 3 жыл бұрын
Thank you, Tim
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@nosubs4278
@nosubs4278 6 ай бұрын
may i ask, does this also apply on online excel? specifically the online version of excel in which collaborators may use/view.
@IAmTimCorey
@IAmTimCorey 6 ай бұрын
This is about creating the actual Excel files. Online Excel still works on an actual Excel file. So, you can still open the files in online Excel.
@ivanjesusK
@ivanjesusK 2 жыл бұрын
Hello Tim. How can I manipulate excel objects but from Visual Studio Code? How is the processes to download the "Microsoft.Office.Interop.Excel" and use it in VS Code platform. Thanks.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
The processes in this video will work in VSCode as well.
@cesarhumbertosegundoulloap1095
@cesarhumbertosegundoulloap1095 3 жыл бұрын
Excellent !!!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks!
@MertCan-fg5jn
@MertCan-fg5jn 3 жыл бұрын
Hello Tim, I am working as a Supply Chain Analyst. We have 3 different excel files which are based on SAP data. I want to create a Windows Application which is going to consolidate all of excels on a page. After that, I need to add some formulas for each column to make a better analysis of the data. Is this application can with multiple excel files?
@maniakm897
@maniakm897 2 жыл бұрын
Hello. I get data in real time mode (for instance every minute) and want to add them (create new row) to current exceel file. Can I do that using EPPlus library ?
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Sure.
@ramansehdev8235
@ramansehdev8235 3 жыл бұрын
Tim what is the best way to do the following. I want open the file on button click and save it (which your video does show)
@nickoder4374
@nickoder4374 3 жыл бұрын
Best video thanksf or tutorial
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thank you!
@cdoug8733
@cdoug8733 3 жыл бұрын
Hey Tim! Any ideas on how would you go about opening an excel file based on the file extension instead of the entire file name?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Using the System.IO namespace, you can search for files in a directory and filter them by extension. Then, just use that list for opening up your Excel files.
@cdoug8733
@cdoug8733 3 жыл бұрын
@@IAmTimCorey Finally got it to work! Thank you for the advice for all the time you put in these videos to help us! Really appreciate it!
@topProgrammer
@topProgrammer 3 жыл бұрын
will this program work if ms office Excel is not installed on the computer?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Yes it will.
@MichaKurzewski
@MichaKurzewski 3 жыл бұрын
Nice to meet you JapaneseCalendar Time Corey! btw recently i am exploring rest api (MSGraph) / CRUD approach -> excel stored on OneDrive, which i would be able then to display as a part of UI in webbrowser control. this way i can view this, process data either with UI or direct in Excel file and it will reflect on other layers. (without running Excel process and no Excel libraries). I dont know if that makes sense yet, however i got few legacy apps that would strongly benefit from this approach and would break from COM shackles.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Interesting. Let us know what you find
@alfonsdeda8912
@alfonsdeda8912 Жыл бұрын
Hi Tim, should excel class be static? I have this doubt because I need to change every time file name because is decided at runtime, and I can't pass to constructor, so I'm thinking to pass file name to every method . Thanks in advance.
@ivannarykin
@ivannarykin 8 ай бұрын
Cool. Thank you!
@IAmTimCorey
@IAmTimCorey 8 ай бұрын
You are welcome.
@user-xh2io7vp9t
@user-xh2io7vp9t 8 ай бұрын
Hi Tim, Great tutorial, is it possible to convert complex PDF file to excel by using EPPlus. If yes, then how? I'll appreciate it.
@IAmTimCorey
@IAmTimCorey 8 ай бұрын
No, it is not. A PDF isn't a good data source for anything. It takes a lot of work to extract data from it. Think of a PDF more as an end product.
@troymitchel4790
@troymitchel4790 3 жыл бұрын
Hey Tim, what are a few places you would recommend for Asp.Net web hosting? Mostly for portfolio projects.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
One that I found I really like is Interserver ( www.interserver.net/r/589892 - that's a referral link, by the way, but it doesn't affect my recommendation). It is $5/month for ASP.NET Core web hosting plus SQL databases. They have been reliable and cheap. I used them for my Getting Started with ASP.NET Core course. I showed off how to deploy each of the five ASP.NET Core types to the host, each with their own sub-domain.
@troymitchel4790
@troymitchel4790 3 жыл бұрын
@@IAmTimCorey Name Cheap + InterServer. Just watched your Web Hosting video. You did a great job on that. Thanks Tim!
@parsamoomkesh1346
@parsamoomkesh1346 3 жыл бұрын
Hi. Great as always. Thanks
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@X400DYL
@X400DYL 2 жыл бұрын
Tim, Question, How would you make the Main method Async Task, in Core 6, as the Main Method is not on show ?
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
It is async by default. You don’t need to do anything. It will just work.
@X400DYL
@X400DYL 2 жыл бұрын
@@IAmTimCorey Thanks Tim, just getting my head around the new template :)
@suryakumar5722
@suryakumar5722 2 жыл бұрын
It's possible in windows application c#?
@RalfsBalodis
@RalfsBalodis 3 жыл бұрын
Hell yeah! Thanks Tim!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@maurice2755
@maurice2755 3 жыл бұрын
How is it possible to report the function property name besides the value? Example. Name: "your string" ?
@songokussj4cz
@songokussj4cz 3 жыл бұрын
Hey Tim, I wrote a similar thing few weeks ago. I was only reading data and importing them into SQL database. The biggest problem was the speed to save 9000 lines of data. Can you share your tips about this? How to import data from Excel to SQL server? I'm using Entity Framework Core 3.1.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Find out where your bottleneck is. Is it the loading or the saving? Once you figure that out, then figure out ways to optimize the process.
@tomtomas730
@tomtomas730 3 жыл бұрын
Always so helpful! Also quick question: Are those little tags inbuilt Visual Studio function or i need some kind of extension to use it? Couldn't find it by myself and it seems very helpful.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Which tags are those? The ones over methods? Those are built-into Visual Studio (all editions).
@tomtomas730
@tomtomas730 3 жыл бұрын
@@IAmTimCorey The ones You were talking about in 23:08 ("PrintHeaders" etc.). Thanks for response.
@dilhaitumhara691
@dilhaitumhara691 4 ай бұрын
DateTime does not show correctly in Excel file
@IAmTimCorey
@IAmTimCorey 4 ай бұрын
That sounds like an Excel formatting issue.
@user-oj2cu6qg5g
@user-oj2cu6qg5g 3 жыл бұрын
Thank you ❤️ how can i change the file to be saved in any device using my app ?
@manuelketisch3752
@manuelketisch3752 3 жыл бұрын
As always, great tutorial, many thanks for taking the time to teach us all that great stuff. Much appreciated! I wonder if you could try to create a ’How To’ of how to stream a whole WPF Form to PDF Format, like an invoice or receipt, without using the windows built in print to pdf function from the print preview, but rather with a normal SaveFileDialog. It would be interesting to see a professional approach on that. I know there is prebuilt stuff like SyncFusion, which is without a doubt a very good solution, but also an expensive one.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thank you. I have added this to my list of possible future topics. This seems to get asked for a lot...
@manuelketisch3752
@manuelketisch3752 3 жыл бұрын
@@IAmTimCorey Yes indeed, i wonder why it is not asked for even more. But nice of you putting it on your list.
@the-matrix-has-you
@the-matrix-has-you 3 жыл бұрын
For simple objects Excel documents are ok. but for complex objects I would export and import with json though. But I understand your need of using Excel documents to import/export data. Thanks to small Companies Who still use Excel to store data! Its 2021 they still using it...
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
This isn’t the same as data export. This is to give to users to work with. Json does not solve that issue. Also, Excel is used in all company sizes.
@the-matrix-has-you
@the-matrix-has-you 3 жыл бұрын
@@IAmTimCorey Yes I get you. I know that Excel documents is for end-user... What I cant beleive is lots of companies still using those files for data stores. And we are in 2021... Its crazy
@TurntableTV
@TurntableTV 3 жыл бұрын
@@the-matrix-has-you But Excel is great for storing non-complex data. Also, filtering, sorting and calculating data is easier for users using Excel.
@windowsbuilderthegreat3121
@windowsbuilderthegreat3121 3 жыл бұрын
Is there MS Word version of this nuget package.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Not from this company. There are ways of creating Word documents like this in C#, though.
@lerocher2182
@lerocher2182 3 жыл бұрын
Tim the BEST!!! Hey Tim there is a way to show Microsoft Word App on a Wpf Grid or UserControl? I need it please!!!!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
That's trickier, because you typically need to use Word Interop, which requires Word to be installed. Some third-party libraries do something like it, though.
@CentroCoronelAprende
@CentroCoronelAprende 3 жыл бұрын
I never received the code in my email. can you help me?
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Check your spam filter and then, if it isn't there, email help@iamtimcorey.com
@leomonk974
@leomonk974 2 жыл бұрын
Hello Mr.Tim I was wondering exactly how you get those tags you mentioned at 23:09
@Spirittism
@Spirittism 2 жыл бұрын
Great work Tim, could you do a vlookup example with excel if possible?
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/
@ElCidPhysics90
@ElCidPhysics90 3 жыл бұрын
Are you using epplus with core because core doesn’t support interop apps like Excel?
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
That was my understanding.
@ElCidPhysics90
@ElCidPhysics90 3 жыл бұрын
@@tomthelestaff-iamtimcorey7597 thank you.
@dilhaitumhara691
@dilhaitumhara691 Жыл бұрын
FirstName property should be "First Name" in Excel۔how to do that???
@IAmTimCorey
@IAmTimCorey Жыл бұрын
stackoverflow.com/a/49454822/733798
@srinivasu2953
@srinivasu2953 3 жыл бұрын
can we able to read Image in xl cell using C#
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I believe so.
@karamyoussef8471
@karamyoussef8471 3 жыл бұрын
hi tim it s great video i m new to c# so I try your code, but it didnt work always throw an Exception System.InvalidOperationException
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Try downloading the source code using the link in the notes. Compare it to your code and see if you can find the issue. Debugging is a key skill to develop, no matter what language you work with. Take it slow and break the issue down into small bites as you work thru the issue. You can do it!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are going to have to trace down what the problem is in your code. My guess is that you missed something small and just need to tweak something.
@UnknownMoses
@UnknownMoses 3 жыл бұрын
Awesome video, if I use EPPlus at work in a class library and include it in my apps for internal line of business applications for internal use, not selling, would that be commercial use? I am using another library (OpenXML) now that is much more involved to write Excel files so I think I'd like to switch to EPPlus.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Yes it would.
@aSaProgrammer
@aSaProgrammer 2 жыл бұрын
Hi how can I add picture to excel using code?
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
They have a documentation site that I believe walks you through that.
@kostasgkoutis8534
@kostasgkoutis8534 3 жыл бұрын
Hey Tim, sort of unrelated question, do you plan to or have you already released any material/video/course on msbuild and csproj files? I would definitely go for it. Keep up the good work!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
No, I don't currently
Intro to Records in C# 9 - How To Use Records And When To Use Them
1:19:44
а ты любишь париться?
00:41
KATYA KLON LIFE
Рет қаралды 3,6 МЛН
The Joker kisses Harley Quinn underwater!#Harley Quinn #joker
00:49
Harley Quinn with the Joker
Рет қаралды 13 МЛН
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 160 МЛН
Or is Harriet Quinn good? #cosplay#joker #Harriet Quinn
00:20
佐助与鸣人
Рет қаралды 5 МЛН
Generating Fake Data in C# with Bogus
36:11
IAmTimCorey
Рет қаралды 22 М.
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
Sending Email in C# using FluentEmail
30:36
IAmTimCorey
Рет қаралды 89 М.
How to read Excel files in C#
8:44
Darren Does Everything
Рет қаралды 40 М.
ChatGPT for Data Analytics: Full Course
3:35:30
Luke Barousse
Рет қаралды 255 М.
а ты любишь париться?
00:41
KATYA KLON LIFE
Рет қаралды 3,6 МЛН