|
Hi Stuart,
When cell is inserted, only cell where the new cell is inserted or deleted will be tracked in sheetchange event. But whereas the allignment of data cannot be tracked.
For example: if following is the data before cell insert
c0 c1 c2 c3
r0 1 2 3 4
r1 2 3 4 5
r2 3 4 5 6
If say I have inserted cell at r1c1 then the allignment of data after cell insert will be:
c0 c1 c2 c3 c4
r0 1 2 3 4
r1 2 * 3 4 5
r2 3 4 5 6
* represents blank cell is inserted.
How to track this change in allignment? For above example allignment change data will be:(r1c2:3,r1c3:4,r1c4:5)
Following is the code in sheet change:
_bstr_t result= target->GetAddress(1,1,Excel::XlReferenceStyle::xlR1C1,1,1);
In result we are getting only r1c1.
As of now we are able to do it when user inserts the cell using context menu: right click->insert, this we are tracking in sheetbeforerightclick, where we are setting the bool flag , and immediately in sheet change we are checking the same bool flag for true , if it is true then we are reading that complete row and complete col.But this will not work when user inserts/deletes the cell through menu.
Please guide us to get this change in allingment of data for all the four options: cell insert/delete(shift cells right, shift cells down)/(shift cells up, shift cells left) when user inserts cell either through context menu or menu.
Thanks in Advance,
Regards,
KTTransfer.
|
|
|
|
|
It doesn't look like you can do that....
Which leads to the question WHY are you trying to track these changes? What's the higher level requirement? There is likely some other, better way of achieving what you really need....
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
yes ..we need to track these changes for better optimization..If suppose somebody ass /deletes single /multiple cells in sheet then as described other cells will get shift to newer positions ..so we nned to update these changes to some server ...to be in sync with sheets ..but we dont want to send whole
data from sheet again to server ..we just want to send latest updated cell ..so we need this event to track this cells...
|
|
|
|
|
Sounds like your optimisation strategy isn't feasible...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
OK ..we have achived this in most of the events ..only this is missing ...anyways ..so according to u for this changes in sheet we need to send complete image of shet to server ?
is that so ?
|
|
|
|
|
Probably the only reliable thing to do...
How big are these worksheets that you need to optimise like this? Are you sure it's not premature optimisation...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
these are very big sheets ..like one cell can contain 3K of data ..then you can assume the size of data we are passing to server ..so need this optimization ...and Its safe one
|
|
|
|
|
Hi Stuart,
Is there any chance to track the "menu" selected by user in Excel Menu Items. If we get this, then we can achieve tracking allignment of data?
Regards,
KTTransfer.
|
|
|
|
|
Hi,
I have a folder conatining lots of file and folder, I am to include all files and folder in my project.
How to instaruct the compiler to add file from "usr/include/abd" directory in visual studio 2008?
|
|
|
|
|
RTFM[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
Hi All,
I want to convert from one media stream to other.Like,convert from mjpeg to mpeg4.
FFMPEG tool is used for this purpose.
could u pls explain how to do programatically??
Thanx.
|
|
|
|
|
FFMPEG is open source.
Download and check the code.
|
|
|
|
|
Hi
I am trying to register several dlls using command promp
>regsvr32 "dll name"
but each time I have to change the path on the command prompt. Is there any way to register a dll without using command prompt (Just as we do in XP). I have used Microsoft Register Server as a default program to open a dll.
But still on Windows 7 some dlls are not getting registered but when I have tried to do the same on command prompt its succeeds.
Thanks
|
|
|
|
|
Why not write a .bat file?
or use
regsvr32 "(Complete path of dll with dll name)"
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
modified on Tuesday, May 11, 2010 5:10 AM
|
|
|
|
|
Even using Batch File it Fails..
I am registering dlls and type libraries in Post Build event. When I try to register the dlls or type libraries using command prompt is succeeds but it fails while using batch files. How to get out of this..??
|
|
|
|
|
Are you running the command prompt as an elevated user, and the batch file as a normal user?
|
|
|
|
|
hello Sirs
I have one project files which have Makefile.vc but it don't having the .sln / .dsw file. I can able to build the source file via visual studio command prompt using build commands. But i need to Create solution for this project what i can do ?
Please replay me
Thanks
Failure is Success If we learn from it!!
|
|
|
|
|
Assuming that you have a version of Visual Studio on your system, then create a new empty solution in the project's directory. Then add the project to the solution and it should be set to go.
It's time for a new signature.
|
|
|
|
|
Hi,
I was trying to compile the following code,
but it give the error that "tmpname cannot appear in constant expression"
I am using the g++ compiler
#include <iostream>
#include <vector>
#include <map>
#include <string>
class TidePhaseAmp
{
public:
float amp;
float phase;
};
main ()
{
std::map< std::string, std::vector<TidePhaseAmp> > extracted_tConst;
const char * tmpname = "2n2";
extracted_tConst.insert(std::pair<std::string, std::vector<TidePhaseAmp>>(tmpname, std::vector<TidePhaseAmp>(5)));
return(0);
}
the compile error messages are
test_map2.cpp: In function ‘int main()’:
test_map2.cpp:19: error: ‘tmpname’ cannot appear in a constant-expression
test_map2.cpp:19: error: a comma operator cannot appear in a constant-expression
test_map2.cpp:19: error: a call to a constructor cannot appear in a constant-expression
test_map2.cpp:19: error: ‘>>’ should be ‘> >’ within a nested template argument list
however the program does not gives any error when I compile it using visual studio 2008 express compiler
is the problem because I am using a constructor in the statement .i.e. std::vector<TidePhaseAmp>(5)
or is there any other workaround for the problem
Gourish
|
|
|
|
|
In this case the important error message is this one:
test_map2.cpp:19: error: ‘>>’ should be ‘> >’ within a nested template argument list
- insert a space between the two '>' symbols and it should compile.
|
|
|
|
|
Use std::make_pair and you don't need to explicitly state the template types, because function template instantiations will deduce the template parameters from the function parameter types:
extracted_tConst.insert(std::make_pair(tmpname, std::vector<TidePhaseAmp>(5)));
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
thanks for the proper suggestion, i implemented it and it worked.
|
|
|
|
|
I want insert checkbox in any coloum in the list view control,but I do not how to do.Using "SetExtendedStyle(LVS_EX_CHECKBOXES)" can only insert checkbox in the first coloum,please help me!
|
|
|
|
|
There are tons of articles about, here at CodeProject [^], for instance, Hans Dietrich's XListCtrl , looks promising.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|