我正在使用Delphi生成Excel工作表,但我遇到的问题是当我使用此代码时:
Workbook.Sheets.Add;
Run Code Online (Sandbox Code Playgroud)
在当前选定的工作表之前添加新工作表:

有谁知道如何在工作簿的最后一页之后添加工作表?
我对Android很陌生,所以请耐心等待.:d
那么我的程序应该在文本中阅读,按下按钮后它应该在另一个位置显示.没有错误,我可以在我的智能手机上安装该应用程序.突然它无缘无故地崩溃了......
我做错了什么?
有没有找到错误没有任何错误?OO
package com.example.a2;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final EditText Eingabe = (EditText) findViewById(R.id.editText1);
final EditText Ausgabe = (EditText) findViewById(R.id.editText2);
final Button button = (Button) findViewById(R.id.button_send);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Ausgabe.setText((CharSequence) Eingabe);
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
Run Code Online (Sandbox Code Playgroud)我的表单上有一个标签,我想要填充字符串的值,但我无法使其正常工作.这是我的代码;
在函数Execute中,我调用函数ShowText((string)result[3]),result是我从数据库查询中获取的对象.这是ShowText函数;
public void ShowText(string message)
{
label4.Text = message;
}
Run Code Online (Sandbox Code Playgroud)
我收到NullReferenceException错误,我做错了什么?
结果[3];
label4

码;
Execute();
InitializeComponent();
var aTimer = new System.Timers.Timer();
aTimer.Elapsed += new ElapsedEventHandler((sender, e) => Execute());
aTimer.Interval = 300000;
aTimer.Enabled = true;
}
public void Execute()
{
int Tijd;
int Videolengte;
string resultaat;
string URL = "";
Database db = new Database(CONNECTION_STRING);
object[] result = db.GetFirstRecord();
if (result == null)
{
return;
}
else
{
//laat app steeds 50ms slapen zodat overgang van muziek mooi …Run Code Online (Sandbox Code Playgroud)