|
You may want to do a little test first to see how much of your data you can actually fit in a WORKBOOK, not a worksheet.
Yeah, you're going to exceed the number of rows available in a single sheet, and that's handled with a bit of work on your part. But, you're bigger problem is that you're probably going to run Excel out of memory before you get through all of your customers.
The test is easy. Take a small sample of records from your database and export them to an Excel sheet. Then copy and paste those records over and over again filling up the sheet as much as possible. Then create a new sheet and paste the records into that, filling up the sheet as much as possible. I think you'll find that you run Excel out of memory fairly quickly and long before you get through all of your customers.
|
|
|
|
|
I'm not sure about the memory issues, as a powerful enough machine should solved that problem, however it sounds as if you are using Excel 2003.
Excel 2003 is limited to 65,536 rows by 256 columns per worksheet. The number of worksheets is only limited by available memory.
If you move to Excel 2007 you can go up the the limit of 1,048,576 rows by 16,384 column per worksheet, with the number of worksheets is limited by available memory.
So either loop and create multiple sheets, or upgrade to 2007. Either way ensure you have a shed-load of memory available.
Excel 2003 Limits[^]
Excel 2007 Limits[^]
|
|
|
|
|
How to retrieve an email using pop3??There is no class pop3 and what is the best method??
|
|
|
|
|
You could have tried this[^] first, and read through some of the suggestions available.
|
|
|
|
|
I have a generic class that I am trying to instantiate through a non-generic static method, but I am having some problems getting the type inference to work. Does anyone see some way to resolve this?
Public Class MirrorObservableCollection(Of T)
Inherits ObservableCollection(Of T)
Friend Sub New(ByVal base As IList(Of T), ByVal mirror As Func(Of T, T))
End Sub
End Class
Public NotInheritable Class MirrorObservableCollection
Private Sub New()
End Sub
Public Shared Function Create(Of TItem, _
TList As {INotifyCollectionChanged, _
IList(Of TItem)})( _
ByVal base As TList, _
ByVal mirror As Func(Of TItem, TItem)) _
As MirrorObservableCollection(Of TItem)
Return New MirrorObservableCollection(Of TItem)(base, mirror)
End Function
End Class
Dim mirror = Function(s As String) s.ToUpperInvariant()
Dim base = New ObservableCollection(Of String)()
Dim m1 = MirrorObservableCollection.Create(Of String, _
ObservableCollection(Of String))(base, mirror)
Dim m2 = MirrorObservableCollection.Create(base, mirror)
EDIT: I tried some other things and found a few ways to make it work. Mixing variables initialized with lambdas and generic inference is not good for your health.
Dim asFunc As Func(Of String, String) = Function(s) s.ToUpperInvariant()
Dim m3 = MirrorObservableCollection.Create(base, asFunc)
Dim m4 = MirrorObservableCollection.Create(base, Function(s As String) s.ToUpperInvariant())
Dim m5 = MirrorObservableCollection.Create(base, Function(s) s.ToUpperInvariant())
Poking around in Reflector shows that mirror is of type AnonymousDelegate(Of string, string) . For those that are interested, my conclusions about what is going on are:
m1) The compiler knows that it needs Func(Of string, string) and will wrap mirror accordingly.
m2) The compiler has not been able to figure out what type to use for TItem and thus if the annonymous delgate signature will match.
m3) The compiler is given a Func(Of string, string) which it will use to deduce that TItem is string and goes from there.
m4) The compiler is given a lambda that is string ->string . There is some voodoo magic to combine lambda signature generation with generic inference and it all works.
m5) The compiler is given a lambda that is ???->???. It cannot determine what type the parameter is and thus assumes object. The error actually given is that the lambda parameter type cannot be determined, but also mentions that base does not implement IList(Of Object) .
What surprises me most is that in neither of the error cases does it seem that the compiler was able to deduce TItem from base , which implements IList(Of String)
|
|
|
|
|
hi, i don't know much about .net framework programing, and i want to learn how to use it but i don't know if i can use c++ with it which is the programing language that i know, i know vb as well but i prefered c++, is there a posibility to use .net framework in pure c++ without using those languages like c#, j# and changing it's syntax like c++/cli and all that stuff or do i need a diferent compiler for that purpose,also want to know if i can mix c++ standard libraris with .net fwrk's ones thank you
|
|
|
|
|
Yes, choose a CLR project type and away you go...
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
As Davey said, use the CLR option and that's a start.
Member 4730435 wrote: if i can mix c++ standard libraris with .net fwrk's ones thank you
Though I have not mixed standard with the .net libraries, I suspect you can through some .dll magic.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
From what I have seen of Managed C++ I have been able to lift code straight from unmanaged C++ and paste it straight in, header files and all. Mind you I just wanted the functionality from some C++ code I found online and the only compiler I had available was Visual Studio. Worked first time.
Managed C++ can of course leverage the .Net runtime libraries as well.
|
|
|
|
|
hi i have one problem .
how i can replace string for image for example :
i write ":)" and i wan't replace to the image
how can i do in a textbox or richtextbox ?
|
|
|
|
|
Can't be done in a TextBox.
Use Google to find an RTB solution, and you discover this one[^] and many others.
|
|
|
|
|
Why can't we make an event in c# without a delegate as eventhandler, like you can in vb.net ?
Learning without thought is labor lost; thought without learning is perilous. (Confucius)
|
|
|
|
|
Events in C# and VB.NET work the same way. If you're refering to the WithEvents keyword, it's just syntactic sugar for having the manual stuff done for you.
|
|
|
|
|
If you don't want to bother creating your own custom delegate you have two other choices in c#
1. Use an inline delegate.
2. Use Generics eg. EventHandler<T>
In VB.Net you also have two options in addition to creating a custom delegate>
1. Use Generics
2. Use WithEvents
WithEvents works rather differently as it gives you rather more than just syntactic sugar, it also deals with reattaching the event handlers to the new object if you change the object referenced. You can even define the event handlers before initialising the object that raises the events.
In C# you have to do that yourself, and you have to have an instance before you can hook up events.
So, C# or VB.NET you can roll your own.
C# you get inline delegates
VB.NET you get less code for complicated event handling scenarios.
Personally I would rather have a little more code that shows me what is really going on. Then it is easier to realise I didn't need half of it in the first place!
|
|
|
|
|
Excellent reply.
Again c# seems to be a lot clearer.
Learning without thought is labor lost; thought without learning is perilous. (Confucius)
|
|
|
|
|
Thanks.
I use c# for my own projects, and VB.Net at work, so I get to see both sides of the coin, and struggle to get the two to do the same. I do prefer the flexibility and control in c#, but some of the RAD tools embedded in VB.Net are excellent.
I wish it were possible to code classes in the same project in different languages so I could use the most appropriate one for the task at a class level. If that included managed C++ for some of the restricted stuff like Extended MAPI then even better.
|
|
|
|
|
Hi,
I want to upload a xml file on Rest web server using vb.net
Can any one suggest how i do this.
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
http://www.youtube.com/watch?v=-oJaaPCrk3Q
|
|
|
|
|
It depends on the server. Do you have any documentation of the server API?
On some servers it is done using the HTTP method - PUT others have POST. Without knowing what server and the API it supports it is not possible to anwer your question exactly.
|
|
|
|
|
|
Thanks for reply,
But this is for design the web service for upload a file. but i want to upload a xml file on rest web service using my .net code.
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
http://www.youtube.com/watch?v=-oJaaPCrk3Q
|
|
|
|
|
Hi,
I am writting an ASP.NET application in VS 2008. I have some COM component written in VC++ 6.0 as a DLL. I Have add reference of COM DLL in my ASP.NET application. In my application I am calling methods from COM DLL which I want to debug but I am not able to debug my COM DLL. Can any one help me how to debug? I am using IE8 on my machine.
thanks in advance.
Yudhisthira
|
|
|
|
|
Run Asp.net application with visual studio 6.0 for VC++ dll Debugging.
|
|
|
|
|
how to run? how to attach dll to ASP application?
|
|
|
|
|
i hav did the same 7 years ago... don't knw the exact tool options....
|
|
|
|
|
M_SqlPathName = dsExecu.Tables(1).Rows(0)("AppSet_PhysicalPath") + Utilities.Dtgetsource.Rows(J)("FileDir") + Utilities.Dtgetsource.Rows(J)("FileName")
Dim sqlcmdsql As New SqlCommand
sqlcmdsql.Connection = sqlCon1
Dim fileInfo1 As FileInfo = New FileInfo(M_SqlPathName) --up to this line of code am getting the server path as D:\attachment\JON103\SQLQuery11.sql
Dim script As String = fileInfo1.OpenText().ReadToEnd() --then in script am not getting any path so it throws null exceptional error
SqlScript = script
pls anyone chk this out and tell me how to get the server path and upload the excel file to it
|
|
|
|