FormulaR1c1 to equal a newly created sheet - formula

I'm try to create a link to a newly created sheet, from an established/existing sheet.
The syntax seems to not read the action.
Sub Add_New_Property()
sheet_name_to_create = Sheet1.Range("g3").Value
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(ActiveSheet.Name).Name = sheet_name_to_create
Sheets("Market Summary").Select
Range("P15").Select
ActiveCell.FormulaR1C1 = "='_ INPUT SHEET _'!R115C6"
What I need is for the formula to link to the newly created sheet. How do I do that.

For the formula part please try:
= Sheet1.Range("g3").Value & R115C6

Related

How to create a GenericGraph based on ExVertex and ExEdge with Graphs.jl in julia?

I am a new user of Julia and I want to work on graphs. I found the Graphs.jl library but not very documented. I tried to create a GenericGraph based on ExVertex and ExEdge but I need more information.
The code I'm using :
using Graphs
CompGraph = GenericGraph{ExVertex, ExEdge{ExVertex}}
temp = ExVertex(1, "VertexName")
temp.attributes["Att"] = "Test"
add_vertex!(CompGraph, temp)
Now I still need the ExVertex list and ExEdge list. Is there any defined parameters? or how can I create such lists?
The solution was too simple. a list is juste a simple array and not a new type. Besides, there is a simple defined function which creates graphs based on different types of edges and vertecies.
I changed my code to :
using Graphs
CG_VertexList = ExVertex[]
CG_EdgeList = ExEdge{ExVertex}[]
CompGraph = graph(CG_VertexList, CG_EdgeList)
temp = ExVertex(1, "VertexName")
temp.attributes["Att"] = "Test"
add_vertex!(CompGraph, temp)

How to copy and paste indd file content into an another indd file?

I'm newbie in indesign scripting stuffs.So I apologise as I couldn't post my trials.
Objective:
I have an indd document which will have figure caption,label etc. I need to copy content(figure which is editable) from other indd file to this document where related figure label exists.
For example:
sample.indd
Some text
Fig.1.1 caption
some text
I need to copy the content of figure1.indd and paste into the sample.indd document where Fig.1.1 string exists and so on. Now I'm doing it manually. But am supposed to automate this.
So, I need some hint how to acheive it using extendscript?
I have found something like below to do this, but I don't have any clue to develop it further and also am not sure whether this approach is correct to get my result. Pls help me
myDocument=app.open(File("file.indd"),false); //opening a file to get the content without showing.
myDocument.pages.item(0).textFrames.item(0).contents="some text";
//here I could set the content but I don't knw how to get the content
// ?????? Then I have to paste the content into active document.
I found the script for my requirement.
var myDoc = File("sample.indd");//Destination File
var myFigDoc = File("fig.indd");//Figure File
app.open(File(myFigDoc));
app.activeDocument.pageItems.everyItem().select();
app.copy();
app.open(File(myDoc));
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = "FIG. 1.1 ";//Figure caption text
//app.findGrepPreferences.appliedParagraphStyle = "FigureCaption";//Figure Caption Style
myFinds = app.activeDocument.findGrep();
for(var i=0;i<myFinds.length;i++){
myFinds[i].insertionPoints[0].contents="\r";
myFinds[i].insertionPoints[0].select();
app.paste();
}
app.findGrepPreferences = app.changeGrepPreferences = null;
If acceptable for you, you can place an indesign file as link (place…). So a script could try to catch the "fig…" strings and do the importation.
Have a look at scripts that use finGrep() and place() command.

Formatting Data in DataSet

I created a data set from an xml file and attached it to a gridview. I would like to do how do i format the data in the dataset or from the gridview, for example, change the header text for a column or also show only certain items in my gridview.
Dim xmlDataSet As New DataSet
xmlDataSet.ReadXml(GlobalClass.GlobalUrl)
GridView1.DataSource = xmlDataSet
GridView1.DataBind()
Is there anyway how to go about manipulating the data inside a dataset? Thank you.
You can try with theses posts :
First definition : http://msdn.microsoft.com/en-us/library/zb0sdh0b.aspx
Note : it's very interessant to read theses links about methods and properties
link 1 : http://msdn.microsoft.com/fr-fr/library/system.data.dataset.aspx
link 2 : http://msdn.microsoft.com/fr-fr/library/system.data.dataset.tables.aspx
You can do this for renaming columns:
xmlDataSet.Tables[0].Columns["CurrentColumnName"].ColumnName = "NewColumnName";
Here is a way to hide or show columns:
xmlDataSet.Tables[0].Columns["ColumnName"].Visible = true;

How to exclude unnecessary buttons in ALV toolbar?

So, inside the TOOLBAR event of the CL_GUI_ALV_GRID the parameter E_OBJECT has the table MT_TOOLBAR that I can access to change all the buttons manually.
Is there a better way to include/exclude standard buttons in the toolbar than simply creating them like custom-buttons in the toolbar event?
Similar to REUSE_ALV_GRID_DISPLAY in class CL_GUI_ALV_GRID there is also a way.
Define a table of type UI_FUNCTIONS and a work area of type UI_FUNC :
data: lt_exclude type ui_functions,
ls_exclude type ui_func.
Append the attributes of the functions you want to hide to the table:
ls_exclude = cl_gui_alv_grid=>mc_fc_sum.
append ls_exclude to lt_exclude.
The attributes of the standard functions all begin with the prefix MC_FC_, in addition, there is the prefix MC_MB_ for an entire menu in the toolbar.
Pass the table using method set_table_for_first_display with parameter it_toolbar_excluding
If you use REUSE_ALV_GRID_DISPLAY in your code, this might be helpful for you:
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = 'ZPROGRAM'
i_callback_pf_status_set = 'SET_PF_STATUS'
it_fieldcat = it_fieldcat
tables
t_outtab = gt_itab.
Your SET_PF_STATUS should be like this in order to eliminate some of the buttons you want. In this example I'm eliminating the "SORT_UP" button.
form set_pf_status using rt_extab type slis_t_extab.
data: lv_flag VALUE 'X'.
if lv_flag is not INITIAL.
append '&OUP' to rt_extab.
endif.
set pf-status 'STANDARD' excluding rt_extab.
endform. "set_pf_status
Hope it was helpful.
Talha
class lcl_event_alv definition .
public section .
methods handle_toolbar for event toolbar of cl_gui_alv_grid
importing e_object e_interactive sender.
class lcl_event_alv implementation .
method handle_toolbar.
delete e_object->mt_toolbar where function = '&LOCAL&INSERT_ROW' or function = '&LOCAL&DELETE_ROW'
or function = '&LOCAL&APPEND' or function = '&LOCAL&COPY'
or function = '&LOCAL&PASTE' or function = '&LOCAL&CUT'
or function = '&LOCAL&COPY_ROW' or function = '&LOCAL&CUT'.
endmethod.
data : go_event type ref to lcl_event_alv.
create object go_event .
set handler go_event->handle_toolbar for go_grid1.
call method go_grid1->set_table_for_first_display
exporting
is_layout = gd_layout
is_variant = value disvariant( report = sy-repid handle = 'GO_GRID1' )
i_save = 'A'
changing
it_fieldcatalog = gt_fcat1
it_outtab = gt_items1.

how to find the GridViewCommandColumn that set ShowSelectCheckbox=true in aspxgridview.columns?

i need to done in programmatic and i have no idea on it. So i need to use loop to search all the columns? For example:
GridViewCommandColumn a= new GridViewCommandColumn();
a.showselectcheckbox=true;
aspxgridview1.columns.find(a);
You can retrieve the required Column via the ASPxGridView.Columns collection in the following manner:
by FieldName/Caption/Name:
GridViewCommandColumn commandColumn = (GridViewCommandColumn)ASPxGridViewInstance.Columns["#"];
by VisibleIndex:
GridViewCommandColumn commandColumn = (GridViewCommandColumn)ASPxGridViewInstance.Columns[0];

Resources