我使用PHP和python编辑一些Excel文件非常困难.
我最初使用PHPExcel在PHP中做了所有事情,但我处理的是非常大的文件,当内存不足时PHPExcel崩溃了.所以我把它改成了用PHP做一些工作,然后用python做其余的工作.
所以这个过程是:
python upload.py Example.xls data.xml由PHP调用我遇到的问题是,如果python脚本修改了我手工创建的常规.xls文件,它可以很好地工作.但是一旦PHP excel修改了Excel文件,python脚本就会产生以下错误:
_locate_stream(Workbook): seen
0 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
20 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
100= 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 …Run Code Online (Sandbox Code Playgroud) 我尝试将文本光标垂直居中在UITextView中.
// creating the inputText
[inputTextView removeFromSuperview];
inputTextView = [[UITextView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(searchIconsButton.frame) + 3 , 0, buttomView.frame.size.width * 0.78 , buttomView.frame.size.height *0.80)];
inputTextView.layer.borderColor = [UIColor lightGrayColor].CGColor;
inputTextView.layer.borderWidth = 0.6;
inputTextView.center = CGPointMake(inputTextView.center.x, buttomView.frame.size.height / 2);
inputTextView.autocorrectionType = UITextAutocorrectionTypeNo;
[inputTextView.layer setCornerRadius:6];
[inputTextView setTintColor:[UIColor blackColor]]; // set the cursor color to black
inputTextView.textAlignment = UIControlContentVerticalAlignmentCenter;
Run Code Online (Sandbox Code Playgroud)
我尝试在最后一行做UIControlContentVerticalAlignmentCenter,但它仍然无法正常工作.
您可以看到光标隐藏在Textview中.
有办法解决吗?