Create custom table in Android Studio - android-studio

I want to creae a table with custom rows and colums in android studio that the number of rows and colums can be input by user. how can i create this by "for" loop?

Related

Pivot table help - Select all accounts started with a certain number

I have a pivot table with 1000s of accounts in the following format 4xxxxx, starting with 4,5,6,and 7. I'm trying to select all accounts started with 7 without selecting them one by one. Is there a shortcut I could use? Thanks!
In the Pivot Table fields select the item and use the label filters. There is an option for begins with

How can I turn part of the Excel data to columns to get a desired output?

For eg - Say I have data in the following format -
Current Format
I would need the data to be formatted in the following format for ease of use -
Required Format
Of course the data contains a lot more records - I'm looking for an easy way to transpose data in this way for large sets of data.
Any help will be appreciated :)
What you want to do is called:
Unpivot:
Select the data and on the Insert menu choose Table
On the Data menu click From Table/Range
The query window will open. Choose the columns you need to extract. With your data the columns to highlight are "Type" and "Number of Cases"
On the Tranform menu choose Unpivot Columns
If the data looks right now, close the Query Editor (accepting changes).
Examples here: Unpivot Excel Data
This is very easy with PowerQuery. It is inbuilt for Excel 2016 and a freely available add in for Version from 2010 to 2013.
You would set your data up as a table excluding the first row which contains the text Number of Cases (Ctrl + T whilst bring up window to create table)
Then from the data tab (Excel 2016) or the Powerquery tab (earlier versions) select data from table and use your newly created table as source.
Highlight the last 3 columns and right click > unpivot columns
Double click in headers section and rename Attribute as Type and Value as Number of Cases
Top left select close and load to
Select table and load to new worksheet (or existing)
View result

Schema Compare doesn't list all columns in a Change

I'm trying to update one table from one database to another database in visual studio 2012 using schema compare. The table exists in both databases, the first one has more columns than the one in the second db. The schema compare shows me that this table is different displaying me the new columns on the left size of the window.
When I try to generate the script for updating the table on the database in the right side, is creating a temp table but is not listing the whole columns, so it gives me an error in one column that is NOT NULL.
Any idea of this behavior? shouldn't be straightforward for this simple change?

Excel format lost while populating thru SSIS

I have an formatted excel destination with one of the columns being a percentage and another being currency. I'm loading this excel with data from a sql table using SSIS. However the excel is not formatted after the load. What is happening?
I was able export two columns of information (percent and dollar value) to an Excel file (97-2003 format) from an SSIS package created in Visual Studio 2010. The data was sourced from a table on a server using SQL Server 2012.
Steps:
Created an Excel file containing a column called Percent and another called Cost. Both were formatted accordingly and are located in the first row.
Saved the file in a 97-2003 format and then closed it.
Created a table in a database and populated it with a couple of records.
create table test_export (
mypercent numeric(18,2),
mydollar numeric(18,2))
insert into test_export values (2.1, 50.00)
insert into test_export values (4.5, 120.00)
Opened Visual Studio 2010 and created a new SSIS package. Created an OLEDB connection to the database.
Under the Control Flow tab added a Data Flow Task and double-clicked on it after it was added. This should now highlight the Data Flow tab.
Add an OLE DB Source and point to the newly added database connection, under Data access mode select Table or View and then select the table created in step #3. Select the OK button.
Add an Excel Destination making certain to create a new Excel connection manager for it and point to the Sheet1$. Make certain to indicate that the first row contains headers. Select the OK button and connect the OLE DB Source task to the Excel Destination task below. Since only numbers are involved, there is no need to apply a Data Conversion task between the two. But in the Excel Destination task remember to select Mappings and connect from left to right which source columns match up with which destination columns.
In the Solution Explorer pane, right-click on the solution and select Properties from the drop-down menu. Open Configuration Properties on the left and the select Debugging under it. On the right under Debug Options, look for Run64BitRuntime and change it from True to False if you have not already done so. Select the OK button.
Run the SSIS package.
Stop the SSIS package when all of the tasks show green for completed.
Open the Excel file and it will now contain the values imported from the database table with the Excel percent and dollar formats preserved from step #1.
I ran these steps in a test and everything worked perfectly. If your formats are not being preserved, then you are likely leaving out a step.
Hope this helps and please indicate if it answered your question.
I had the same problem. What I did was:
apply conditional formatting on the column.
see attached picture
It is also important that you have in the first row, a model row, filled with numeric/text values, in order for the ssis to export the numbers as numbers and not as strings model row
If your template contains several rows before the place where ssis start to export the data, you might need to have more model rows. (I needed 4). This rows have to be the first rows in the document, regardless where you start the export.
You can hide the model rows

Opening BIDS and setting up a flat file connection upon a button click in an excel work book

I am working on a project which has field names and length of the respective fields in excel workbook. I am very new to excel macro programing and I have least knowledge about this.
Here is the detailed description on what I am up to;
Field names are in column A and starts from row 6.
Length of the respective field names are in column C and start from row 6.
A button will be placed in the which has the above details.
Upon button click, read the columns A and C.
Open BIDS 2008.
Add a flat file connection manager.
Create the columns for added connection manager, with the field names and their respective lengths.
I want the above to be done via a excel macro code.
Please help me on this.
Thanks in advance.
Why must you have a button in excel do this?
Just script the package c# (or whatever language) using the excel file as a sort of .ini/config file.

Resources