Hi,
Hope someone can help me out with this. I have a CC3 sharp app that needs to
export data to an excel file. Problem is the version of excel can be 97 to
2003.
Anyway, have been able to use InvokeMember for ranges and values, ie:
Parameters = new Object[2];
Parameters[0] = "C2:C6";
Parameters[1] = Missing.Value;
objRange_Late = objSheet_Late.G etType().Invoke Member(
"Range",Binding Flags.GetProper ty, null, objSheet_Late, Parameters );
Parameters = new Object[1];
Parameters[0] = "=A2 & \" \" & B2";;
objRange_Late.G etType().Invoke Member( "Value",
BindingFlags.Se tProperty,null, objRange_Late, Parameters );
What I can't figure how to is set properties like the font, font.color,
bold, etc.
I have looked, searched everywhere I can think of.
I sure would appreciate any help and guidance.
Thanks in advance,
Bud Dean 1 3729
Maybe this works.
object oFont = Rng.GetType().I nvokeMember("Fo nt",
BindingFlags.Ge tProperty, null, Rng, null);
oFont.GetType() .InvokeMember(" ColorIndex", BindingFlags.Se tProperty, null,
oFont, new object[]{5});
oFont.GetType() .InvokeMember(" Bold", BindingFlags.Se tProperty, null,
oFont, new object[]{true}); This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: stainless |
last post by:
I am currently designing a .NET system that takes a piece of text from
a SQL Server database (this is
variable), writes it to an excel spreedsheet in a cell of known length
and height (in centimetres so that it is always printed in exactly the
same dimensions) using the Arial font.
Knowing the cell size, I need to calculate the font size so that the
text fits into the cell and fills it with minimum space around it
(obviously, long...
|
by: frasmus44 |
last post by:
I have searched this group for ways to create jumbo fonts in my Access
forms and reports. Unlike MS Word and MS Excel, Access has a 127 point
font limit. (About 1.75" tall) I'm referring to bound controls here,
so pasting a bitmap into the form is not a solution. I am using Access
2000 (9.0.4402 SR-1).
After playing with some ActiveX controls, I found the Microsoft Forms
2.0 textbox looked promising. I placed the control in a form and...
|
by: Baskar RajaSekharan |
last post by:
Hi I have one doubt in C#.
I created one component called CustomTesting in VC7. The DLL
contains Two Method called Execute and SetOCxInterface. I want to Load the
Dll
from my Sample application(which is in C#) with out Addeing it in
Reference. ie i want to load it dynamically with the help of
Activator.CreateInstance. Then i want to access those method. How to Do
that?
|
by: Amith |
last post by:
Hi,
I am using an ActiveX created using delphi. It has a font property exposed.
The font property is of type IFontDisp in the server(delphi). The font
properties like Size, Bold, Underline etc has both 'Set' and 'Get' methods
when using the activex in a VS6 app.
But when using the activeX in a VS.NET app, the font properties are read
only. The only way that i can set the font properties is by:
|
by: Sakharam Phapale |
last post by:
Hi All,
How to preserve the old font properties while changing new one?
I posted same question 2 months back, but I had very small time then.
eg. "Shopping for" is a text in RichTextBox and already formatted as
"Shopping" ---Bold
"for" -----Regular
Now I want to underline whole text by preserving old style i.e. Bold and
| |
by: RBChallenger |
last post by:
Can anyone tell me how to set the font properties in an embedded OWC11
excel speradsheet. You can get to the font properties via
spreadSheet.Cells.Font.<Property>, however if I want to set the
porperty Size I cannot simply say .Size = x; and I ahve been unable to
find the accessor method to set the field. Anyone have any suggestions?
--
RBChallenger
------------------------------------------------------------------------
|
by: Tony Girgenti |
last post by:
Hello.
Developing a Windows Form program in VS.NET VB, .NET Framework 1.1.4322 on a
windows XP Pro, SP2.
Before printing a document, i want to set the font to a font that is only
available with the printer that i am printing to(Zebra TLP2844).
When i open Word and look at the fonts available for the default printer, it
does not show the fonts i want. If i cahnge the printer to the printer that
|
by: j2flk1234 |
last post by:
Hi,
I have a chart that I created in excel through VB. I want to try and change the font name from Times New Roman to Symbol. I tried recording the macro in excel but when I use the code in VB it doesn't work. Here is what I got:
Dim xlApp As Excel.Application
Set xlApp = New Excel.Application
xlApp.DisplayAlerts = False
Dim xlWkb As Excel.Workbook
Set xlWkb = xlApp.Workbooks.Add
Dim xlSht As Excel.Worksheet
|
by: =?Utf-8?B?QW5kcmV3?= |
last post by:
Found it.
string name = Properties.Settings.Default.ClassName.ToString();
//"myproject.myclass, myassembly" format.
//name = "ABC.MyClass, Assem" ;
Type t = Type.GetType(name);
Object obj = Activator.CreateInstance(t);
string result = t.InvokeMember("methodName",
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |