在Google Scripts中寻找SetFormula的帮助。我希望它能够导入一个范围,但每天只能输入一次,而不是所有时间。
为什么这个简单的setformula工作得很好:
<drawer:RadSideDrawer id="drawer">
<drawer:RadSideDrawer.mainContent>
<StackLayout>
<ListView items="{{myitems}}" itemTap="ontap">
<ListView.itemTemplate>
<StackLayout orientation="horizontal">
<Label text="{{name}}" class="list"/>
<Label class="bar-font" text="" id="point" />
</StackLayout>
</ListView.itemTemplate>
</ListView>
</StackLayout>
</drawer:RadSideDrawer.mainContent>
<drawer:RadSideDrawer.drawerContent class="drawer">
<GridLayout class="drawer-content">
<StackLayout>
<Label text="Survey" tap="surveytap"/>
<Label text="Forms" tap="formstap"/>
<Label text="Profile" tap="profiletap"/>
<Label text="Logout" tap="logouttap"/>
</StackLayout>
</GridLayout>
</drawer:RadSideDrawer.drawerContent>
</drawer:RadSideDrawer>
</StackLayout>
但似乎无法使IMPORTRANGE正常工作(ID隐藏):
private void LSum_Load(object sender, EventArgs e)
{
PassengersTXT.Text = LEFcPassanger.sendtext;
DepartDateTXT.Text = LutonDepart.sendtext;
DepTimeTXT.Text = LutonSat.sendtext;
TravelTypeTXT.Text = LEClass.sendtext;
DepartTXT.Text = Form2.sendtext;
ArriveTXT.Text = LArrive.sendtext;
}
if( TravelTypeTXT.Text == "First Class")
{
Seating.FirstClass -= Convert.ToInt32(PassengersTXT.Text);
if (Seating.FirstClass <= 0)
{
MessageBox.Show("Not Enough Seats in First Class", "ERROR!",
MessageBoxButtons.OK, MessageBoxIcon.Error);
LEFcPassanger form = new LEFcPassanger();
form.Show();
this.Close();
}
else
{
Seating.FirstClass -= Convert.ToInt32(PassengersTXT.Text);
AppFin frm = new AppFin();
frm.Show();
this.Close();
}
//seperate class
class Seating
{
public static int FirstClass = 20;
public static int BusinessClass = 36;
public static int EconomyClass = 84;
public static int TotalSeats = 140;
}
当我直接在单元格中使用Import Range公式时,一切都完美无缺。只是尝试通过脚本触发器自动执行此操作。然后我将关闭值并删除导入公式。我不想连续摄取,只需从另一张纸上一次转移。
我的编码没有任何脚本错误,但我不是交易编码器。
谢谢! 本
答案 0 :(得分:0)
对不起,别回答。好消息是代码实际上运行良好。