Feb 6th, 2007, 02:40 PM
#1
Thread Starter
Hyperactive Member
Import excel file into MSFlexgrid
Hello ,
i would like to import an excel file into a MSFlexGrid but when I try the Datasource way it doesn't work. Does anyone has any code available?
Feb 6th, 2007, 04:21 PM
#2
Re: Import excel file into MSFlexgrid
Does this help?
http://www.freevbcode.com/ShowCode.asp?ID=7354
you will have to extract the code from the part where it is importing to excel...
Hope it helps...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear :
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Feb 6th, 2007, 04:44 PM
#3
Thread Starter
Hyperactive Member
Re: Import excel file into MSFlexgrid
thanks, but it doesn't work.
Feb 6th, 2007, 04:47 PM
#4
Re: Import excel file into MSFlexgrid
thanks, but it doesn't work.
What exactly doesn't work? Are you getting any error messages? or is there any code missing?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear :
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Feb 6th, 2007, 04:51 PM
#5
Thread Starter
Hyperactive Member
Re: Import excel file into MSFlexgrid
I took a screenshot of the error.
Here is the screenshot:
Attached Images
Feb 6th, 2007, 04:58 PM
#6
Re: Import excel file into MSFlexgrid
Oh, Ok...
After you open the project, don't run it. Like I said in my previous post you will have to extract the code...
Check out the code in the form ExcelImportDataFile under
Public Sub ReadExcelFile()
End Sub
Hope this helps...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear :
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Feb 6th, 2007, 05:01 PM
#7
Re: Import excel file into MSFlexgrid
Feb 6th, 2007, 05:07 PM
#8
Thread Starter
Hyperactive Member
Re: Import excel file into MSFlexgrid
Originally Posted by
koolsid
Oh, Ok...
After you open the project, don't run it. Like I said in my previous post you will have to extract the code...
Check out the code in the form ExcelImportDataFile under
Public Sub ReadExcelFile()
End Sub
Hope this helps...
I know this example and I extracted the code yesterday. I have the same problem.
That's why I wrote that I have problems with the DataSource method.
Feb 6th, 2007, 05:08 PM
#9
Thread Starter
Hyperactive Member
Re: Import excel file into MSFlexgrid
Originally Posted by
jcis
This sample helped me a little but when I don't know how many cells to copy, what could I do?
Feb 6th, 2007, 05:09 PM
#10
Re: Import excel file into MSFlexgrid
@jcis: That's a damn neat code
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear :
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Feb 6th, 2007, 05:18 PM
#11
Re: Import excel file into MSFlexgrid
Originally Posted by
DarkX_Greece
This sample helped me a little but when I don't know how many cells to copy, what could I do?
So you want the Flexgrid to look exactly like the Workseet? If so there is a property of the worksheet i think, something like UsedRange, you can send that to Clipboard and use UsedRange.Columns or something like that to get the columns and row count, if this doen't work you can still do it Splitting the string in the Cliopboard, the separator is vbTab. When you have as many rows and cols are needed then paste in the Flex.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width